Click to See Complete Forum and Search --> : upload thru port 21 or 80 only


Grymlot
03-10-2003, 04:22 AM
I am fairly new to PERL, in fact I am still learning it... However, I know plenty of programming, so I can figure any code out if I know what keywords do what and etc. Anyways rather than wait til I learn it, I was wondering if someone could help me out....

I need a PERL script in which I can do an In Browser upload that will upload the file either through FTP port 21, or through HTTP port 80, as those are the only that my friend will allow on his server...

It must be very user friendly so I can just use an HTML input type="file".... so someone can select a file and upload it without having to do anything special

Also, file type validation is a must as well... only image files allowed... including .jpg, .gif, and .bmp

Please point me to a code example if possible, thanks alot!

jeffmott
03-11-2003, 11:09 AM
See the CGI (http://www.perldoc.com/perl5.8.0/lib/CGI.html#CREATING-A-FILE-UPLOAD-FIELD) module for routines to handle file uploads.