Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: file not getting through post

by amphiplex (Monk)
on Jul 02, 2002 at 07:58 UTC ( #178792=note: print w/replies, xml ) Need Help??

in reply to file not getting through post

Hi ! This should work with a small change:
zfile =>["$ENV{DOCUMENT_ROOT}/"],
instead of
zfile =>"$ENV{DOCUMENT_ROOT}/",
From perldoc HTTP::Request::Common:
The POST method also supports the "multi­ part/form-data" content used for Form-based File Upload as specified in RFC 1867. You trigger this content format by specifying a content type of "'form-data'" as one of the request headers. If one of the values in the $form_ref is an array reference, then it is treated as a file part specification with the following interpretation: [ $file, $filename, Header => Value... ] The first value in the array ($file) is the name of a file to open. This file will be read and its content placed in the request. The routine will croak if the file can't be opened. Use an "undef" as $file value if you want to specify the content directly. The $filename is the filename to report in the request. If this value is undefined, then the basename of the $file will be used. You can specify an empty string as $filename if you don't want any filename in the request.

---- kurt

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2022-10-03 04:49 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (13 votes). Check out past polls.