halfcountplus has asked for the wisdom of the Perl Monks concerning the following question:
edit: the form should be enctype="multipart/form-data"<form name="test" method="post" action="/cgi-bin/test.pl"> <input name="myfile" type="file"> <button>Submit</button> </form>
edit: all this is fine nowmy $cgi = new CGI; my $file = $cgi->param('myfile'); my $fh = $cgi->upload('myfile'); #my $type = $cgi->uploadInfo($file)->{'Content-Type'}; print "<p>$file"; print $_ while (<$fh>);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: uploading via CGI
by ikegami (Patriarch) on Jul 17, 2009 at 18:43 UTC | |
by halfcountplus (Hermit) on Jul 17, 2009 at 18:47 UTC | |
by ikegami (Patriarch) on Jul 17, 2009 at 18:53 UTC |