Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Cgi Upload

by fpi (Monk)
on Mar 19, 2001 at 05:25 UTC ( [id://65330]=note: print w/replies, xml ) Need Help??


in reply to Cgi Upload

pokemonk, when you say it didn't work, what happened, nothing at all? Because the CGI upload can go wrong in several places, so tracing if anything was transferred to the server is important.

As usual, make sure of this:
1. Make sure you are sending the ENCTYPE as "multipart/form-data" in your form
2. Make sure you are using CGI.pm correctly to receive it.
3. You didn't mention the platform of the server and the client, because it's not unreasonable to check if it works differently with IE vs. Netscape, and what version you are using. The cgi.pm docs say that inconsistencies arise with different combinations of platform/webserver/browser.

To help you trace what is going on, remember that CGI.pm works by uploading the file to a temporary directory specified in the CGI module, depending on the server's platform. And then you transfer it to your desired location in your code. So if you can determine if the temp file is being created, then that would greatly help in your debugging.

Addition: (After reading your reply below): You say you are using windows - what webserver are you using? Since you are eventually going to use this on Unix, I would suggest testing your script now on Unix. The upload problem you have may not be in your code, but in the relationship between win/webserver/browser. This is explicitly stated by the author of cgi.pm. PerlMonks users have posted problems with upload on windows servers, and I have had personal experience with the inability to upload on pre-OS X Mac webservers. Try it on your Unix machine and it may work with no problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://65330]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2024-04-25 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found