perleager has asked for the wisdom of the Perl Monks concerning the following question:
use CGI; $CGI::POST_MAX = 1536000; #1.5MB my $upload_dir = "C:/Web Sites/Projects/Uploading/datapath"; my $business_plan_file = $results->valid('file_name'); #I'm using Data::FormValidator, $results->valid('file_name') is th +e input from the upload field in my form. $business_plan_file =~ s/.*[\/\\](.*)/$1/; #retrieves filename +w/out users full path my $upload_filehandle = $results->valid('file_name'); open UPLOADFILE, ">$upload_dir/$business_plan_file" or die; binmode UPLOADFILE; while ( <$upload_filehandle> ) { print UPLOADFILE; } close UPLOADFILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Setting max upload size/MIME types
by Tomte (Priest) on Mar 17, 2004 at 08:19 UTC | |
|
Re: Setting max upload size/MIME types
by iburrell (Chaplain) on Mar 17, 2004 at 19:53 UTC | |
by perleager (Pilgrim) on Mar 17, 2004 at 20:34 UTC |