Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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

Replies are listed 'Best First'.
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?
[stonecolddevin]: i went too far down the irc rabbithole to hook this back up there
[Discipulus]: .. yes erix until NodeReaper put jhon coltrane again
[erix]: nice cover with the spitting image of George (and a great solo by Prince at the end )
[Discipulus]: good night monks! i feel fresh as the turkey in the hoven but i need to sleep
[planetscape]: gobble, gobble, Discipulus!
[erix]: Discipulus: buonanotte! :)
[stonecolddevin]: man we need a new guitar legend
[stonecolddevin]: Clapton has issues playing nowadays
[stonecolddevin]: Prince is gone
[stonecolddevin]: Van Halen is still around but I haven't heard any of their new stuff

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-06-22 21:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (531 votes). Check out past polls.