Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: CGI file upload: Print to filehandle vs move file

by stonecolddevin (Vicar)
on Oct 19, 2009 at 19:13 UTC ( #802074=note: print w/ replies, xml ) Need Help??


in reply to CGI file upload: Print to filehandle vs move file

Check out CGI::Upload. Typically it's nice to upload it to a temp directory, check out that it's sane/untained, then copy it to a permanent location.

mtfnpy


Comment on Re: CGI file upload: Print to filehandle vs move file
Re^2: CGI file upload: Print to filehandle vs move file
by tospo (Hermit) on Oct 20, 2009 at 08:12 UTC
    Thanks!
    CGI::Upload seems like a good idea. So I guess in summary it's fair to say that the only reason why the upload procedure is usually taught with the loop over the file's contents is that that gives you the chance to read the file and give some feedback to the user and if this is not required then simply copying/moving the file is acceptable.
    Thanks everybody!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://802074]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (18)
As of 2014-07-23 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (144 votes), past polls