Link to home
Start Free TrialLog in
Avatar of eugeniac
eugeniac

asked on

File Upload Problems

I found the file upload script in the cgi-perl library, but am unable to figure out how to set where on the server the file is uploaded to.  Any ideas?  Also, is there a way to this if you don't have cgi-lib installed?
Thanks.
Avatar of ozo
ozo
Flag of United States of America image

what file upload script?
Avatar of yoren
yoren

If you're talking about the cgi-lib I think you're talking about (the one that has ReadParse() which sets the hash %in), then the file contents are actually assigned to a CGI parameter. You then write that variable's value to whatever file you want. The name of the CGI parameter is the name of the file upload box on your HTML page. So if your HTML file had this:

<input type=file name="thefile"...>

then $in{'thefile'} in the perl script will hold the file contents.
ASKER CERTIFIED SOLUTION
Avatar of hap
hap

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial