[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: <FILE> upload using Perl
> > Can someone please offer me a small perl code snippet that gets the file
> > uploaded from a browser using the <INPUT TYPE=FILE> tag and puts it in a
> > file.
>
> Can you be a little more specific ? Are you expecting perl to behave
> like a browser and upload the file or do you want perl to assist
> the browser in some way ?
No, I dont want perl to behave as a browser. I just want to use CGI-perl
combo to read the file that has been uploaded using HTTP using a <INPUT
TYPE=FILE NAME=filename> tag in a HTML <FORM>.
So, I have a HTML FORM like this:
<FORM ACTION=PerlScriptThatIWant.pl METHOD=POST>
<INPUT TYPE=FILE NAME=filename SIZE=30>
<INPUT TYPE=SUBMIT VALUE='Submit'>
</FORM>
I just want a code snippet of the "PerlScriptThatIWant.pl" This CGI-perl
script should read the POST request, and put all this file data into a
file called "TEMPFILE"
Thanks,
Rohit