Yes, renaming a file is much faster and quite appropriate for things like image files.
You have a potential denial of service attack when you slurp the entire uploaded file into RAM, which is why CGI recommends using read instead.binmode UPLOADFILE; while ( <$upload_filehandle> )
while ($bytesread = $io_handle->read($buffer,1024)) {
In reply to Re: CGI file upload: Print to filehandle vs move file
by rowdog
in thread CGI file upload: Print to filehandle vs move file
by tospo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |