Solved

File Upload Problems

Posted on 1999-01-06
3
164 Views
Last Modified: 2010-03-05
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.
0
Comment
Question by:eugeniac
3 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1207355
what file upload script?
0
 
LVL 7

Expert Comment

by:yoren
ID: 1207356
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.
0
 

Accepted Solution

by:
hap earned 50 total points
ID: 1207357
You can find the script you need right here:

http://www.freeperlcode.com/guide/Internet_Protocals/File_Upload/

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl efficient DB Call 8 93
perl script to check whether folder contains any files 5 92
Problem with one substitution modifying another 3 73
Convert grep lines to perl 6 58
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question