Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: http upload simulating browser

by miyagawa (Chaplain)
on Dec 07, 2001 at 00:36 UTC ( [id://130057]=note: print w/replies, xml ) Need Help??


in reply to http upload simulating browser

you should use CODE tag.

File uploading via LWP is done like this (quote from perldoc: HTTP::Request::Common)

POST 'http://www.perl.org/survey.cgi', Content_Type => 'form-data', Content => [ name => 'Gisle Aas', email => 'gisle@aas.no', gender => 'M', born => '1964', init => ["$ENV{HOME}/.profile"], ]
the point is
  • set content-type to multipart/form-data
  • use arrayref to indicate file upload

    --
    Tatsuhiko Miyagawa
    miyagawa@cpan.org

  • Log In?
    Username:
    Password:

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

    How do I use this?Last hourOther CB clients
    Other Users?
    Others examining the Monastery: (6)
    As of 2024-04-25 10:38 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found