in reply to Short read error?
This will get you the filename that the HTTP client suggested, not a handle to the input stream. Therefore the "read($file,$buffer,1024)" command fails and not all of the incoming data stream is read.$file = $query->param('fileID')
Gets you a proper input filehandle, then use read($fh,$buffer,1024) as per your code.my $fh = $query->upload('fileID');
I would recommend to also set binmode($fh) as well as on the output file so that you can safely process non-text files.
|
|---|