in reply to Re: Getting a filehandle for uploaded file
in thread Getting a filehandle for uploaded file
i.e. param is called with the name of the field.CREATING A FILE UPLOAD FIELD ... print filefield(-name=>'uploaded_file', ... When the form is processed, you can retrieve the entered filename by c +alling param(): $filename = param('uploaded_file');
Then it says:
I have also tried the no strict trick mentioned there, but it didn't help. Have also checked it's not browser-dependent.The filename returned is also a file handle... # Copy a binary file to somewhere safe open (OUTFILE,">>/usr/local/web/users/feedback"); while ($bytesread=read($filename,$buffer,1024)) { print OUTFILE $buffer; }
|
|---|