Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: File uploading methods compared

by mlh2003 (Scribe)
on May 14, 2005 at 13:49 UTC ( #457068=note: print w/replies, xml ) Need Help??


in reply to File uploading methods compared

It is more secure to use CGI.pm's upload() method to create a filehandle and read from that filehandle than to create a filehandle from user-supplied data in a file upload field. Therefore, it is recommended to use the latter code snippet.

The link that explains this in more detail is here.

ADDITION:
Also, you can set the $CGI::POST_MAX and $CGI::DISABLE_UPLOADS to specify the maximum bytesize of a file that can be uploaded and to enable/disable file uploads, respectively. The link above contains information on those variables as well.
_______
Code is untested unless explicitly stated
mlh2003

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2021-10-17 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (72 votes). Check out past polls.

    Notices?