in reply to Re: Re: Re: Yet another CGI Upload problem - not like the others!
in thread Yet another CGI Upload problem - not like the others!
#!/usr/bin/perl use warnings; use strict; use CGI::Simple; $CGI::Simple::POST_MAX = 1024; # max upload via post default 100 +kB $CGI::Simple::DISABLE_UPLOADS = 0; #enable uploads my $upload_dir='uploads'; my $q = new CGI::Simple; print $q->header(); my $files = $q->upload(); # number of files uploaded +; my @files = $q->upload(); # names of all uploaded fil +es my $filename = $q->param('upload_file'); # filename of uploaded fil +e my $mime = $q->upload_info($filename,'mime'); # MIME type of uploa +ded file my $size = $q->upload_info($filename,'size'); # size of uploaded f +ile # short and sweet upload my $ok = $q->upload( $q->param('upload_file'),"$upload_dir/$filename") +; print "Uploaded ".$q->param('upload_file')." and wrote it OK!\n" if $o +k; print "total files = $files<br> filenames = @files<br> filename = $filename<br> mimetype= $mime<br> size=$size<br>";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Yet another CGI Upload problem - not like the others!
by tachyon (Chancellor) on Dec 15, 2002 at 01:27 UTC | |
by fireartist (Chaplain) on Sep 24, 2004 at 23:17 UTC | |
by tachyon (Chancellor) on Sep 25, 2004 at 01:17 UTC |