in reply to CGI::Minimal does not work with enctype="multipart/form-data"?
Hi relax99,
CGI::Minimal works for me. Here is a minimal :) example:
#!/usr/bin/perl use strict; use warnings; use CGI::Minimal; my $cgi = CGI::Minimal->new; if ($cgi->param('uploading')) { print "Content-type: ", $cgi->param_mime('thing'), "\r\n\r\n"; print $cgi->param('thing'); } else { print "Content-type: text/html\r\n\r\n"; print q{ <html><body> <form action="/cgi-bin/myup.cgi" method="post" enctype="multipart/fo +rm-data"> <input type="hidden" name="uploading" value="yes"> <input type="file" name="thing" size="16"><br> <b><input type="submit" value=" Upload "></b> </form> </body></html>}; } exit;
It was not clear from the man page that param_filename(...) is only for retrieving the filename and that we should use param(...) to get file content...
Ciao, Valerio
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: CGI::Minimal does not work with enctype="multipart/form-data"?
by relax99 (Monk) on Oct 21, 2002 at 11:45 UTC | |
by valdez (Monsignor) on Oct 21, 2002 at 11:59 UTC | |
by relax99 (Monk) on Oct 21, 2002 at 12:20 UTC | |
by relax99 (Monk) on Oct 24, 2002 at 12:42 UTC | |
by valdez (Monsignor) on Oct 24, 2002 at 12:58 UTC | |
|