Jump to content

CGI Help


Kyle

Recommended Posts

I know how to build the image upload part, but every time I try to upload an image from it, it doesn't do anything. I want it to be like www.imageshack.com , where it displays the url to the image after you upload it. Anyone know how to make this work?

Link to comment
Share on other sites

Image uploading is based on two things - the absolute path of it on the file on the server and its location within a website.To clarify what I mean you need to understand the a file on a web server is referenced by the server path:x:\inetpub\wwwroot\mysite\xxxxxx.xxxNow that, naturally, will be stored in a location that makes it accessible by a URL:http://www.mysite.com/xxxxxx.xxxOne more thing to understand is that when you upload a file, your application has to define where to put the file (ie. x:\inetpub\wwwroot\mysite\xxxxxx.xxx). A server will typically store that file in a temp directory until it has fully uploaded the file.So, to address your problem, you could be faced with one of the following situations.a.) the file is never uploadedb.) the file is uploaded to the temp folder but never moved to the live folderc.) your host could be set up to refuse this capability.To troubleshoot, FTP into your site (unless its local) and check to see if the file exists in the target location. If not, check to see if it made it into the temporary folder (which you may or may not have access to). Finally, check to make sure that your application has read, write, delete priviledges on the server - if not you won't be able to do anything.Hope this helps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...