Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: @CGI $q->upload() doesnt work properly

by Eliya (Vicar)
on Mar 08, 2012 at 14:35 UTC ( #958476=note: print w/ replies, xml ) Need Help??


in reply to @CGI $q->upload() doesnt work properly

my $upload_Handle = $q->upload($filename);

Looks like you're specifying a file name here.

It should be the name of the respective file input field in the form, presumably

<input type="file" name="upload_file" /> ^^^^^^^^^^^

just like you're already using it to get the file name via $q->param('upload_file').

my $filename = $q->param('upload_file'); # returns (client-side) +name of the file my $filehandle = $q->upload('upload_file'); # returns handle to the +server-side temp file


Comment on Re: @CGI $q->upload() doesnt work properly
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://958476]
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: (16)
As of 2015-07-30 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls