At 10:36 PM 05/10/2002, Chad Wallace wrote: >Hello, > >I've been trying to get a file upload to work. I was first using CGI.pm, but it was >giving me problems, and I couldn't figure it out. > >I decided to switch to CGI::Lite, and the uploads seemed to work. However, they >never were working. The $form->{'upload'} variable was simply returning the name of >the file on the client machine, which just happened to be the server machine... so >when I opened the file, it was opening the original file, and bypassing the upload >entirely. Of course, when I then tried to upload something from another machine, it >wouldn't work. > >Now, I changed my script to use a filehandle instead of a filename, and put in >"$cgi->set_file_type('handle')" before the parse_form_data... But it still returns >the CLIENT-SIDE FILENAME in $form->{'upload'}, which gives an error when I try to use >it as a filehandle!! > >'upload' is the name of my <input type=file>. Is there another, undocumented, method >to access the filehandles of uploaded files? > >Any ideas here?
There's a working example of a file upload script using CGI at www.gossland.com/course/cgi_use/uploading.html Perhaps it'll show you what you are missing. HTH, Mike G _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs