oucher
asked on
Uploading files
Does anyone know how to
1) make a form be able to upload binary files (I know there's something you have to put in the form tag, but I can't remember what)
2) use Perl to get that data and write it to a file
For uploading pictures to a web page, etc.
1) make a form be able to upload binary files (I know there's something you have to put in the form tag, but I can't remember what)
2) use Perl to get that data and write it to a file
For uploading pictures to a web page, etc.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here comes the answer:
<form method="POST" name="AddForm" action="/cgi/upload.pl" enctype="multipart/form-da ta">
<input type="file" name="upload">
<input type="submit" name="B1">
</form>
of course you have to suply your own perl script. Free ones can be downloaded from many pages. Here comes a good link:
http://perlguy.com/perl/upload.txt
When I once wrote an upload service I forgot to set the enctype field in the form tag... THAT IS VERY IMPORTANT.
ENCTYPE must be set to: multipart/form-data
(enctype="multipart/form-d ata") to make it work.
/Probie
<form method="POST" name="AddForm" action="/cgi/upload.pl" enctype="multipart/form-da
<input type="file" name="upload">
<input type="submit" name="B1">
</form>
of course you have to suply your own perl script. Free ones can be downloaded from many pages. Here comes a good link:
http://perlguy.com/perl/upload.txt
When I once wrote an upload service I forgot to set the enctype field in the form tag... THAT IS VERY IMPORTANT.
ENCTYPE must be set to: multipart/form-data
(enctype="multipart/form-d
/Probie
ASKER