in reply to Getting a filehandle for uploaded file
Is the problem that you are trying to read from the filename, not the filehandle? From the CGI documentation:
To be safe, use the upload() function (new in version 2.47). When called with the name of an upload field, upload() returns a filehandle-like object, or undef if the parameter is not a valid filehandle.
Pulling a quote from Bloodnok's post below:
If there was a problem uploading the file -- for example, the file was bigger than the $CGI::POST_MAX setting -- $filename will be empty. We can test for this and report the problem to the user as follows:
So you could test for that, too.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting a filehandle for uploaded file
by luker (Initiate) on Oct 20, 2009 at 15:51 UTC | |
by skx (Parson) on Oct 20, 2009 at 15:53 UTC |