Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: WWW::Mechanize and file upload

by ferreira (Chaplain)
on Jan 05, 2007 at 18:16 UTC ( [id://593182]=note: print w/replies, xml ) Need Help??


in reply to WWW::Mechanize and file upload

Anyone any ideas why this isn't working?

I doubt. How is it not working? Does it die? Does it not do what you want? And what you expect on a successful run?

First random hint: let WWW::Mechanize do the testing of results for you (as you're not checking anything right now). That can be done with:

$mech = WWW::Mechanize->new(autocheck=>1);

Second and last random hint: read the documentation (WWW::Mechanize) carefully and thoroughly.

Replies are listed 'Best First'.
Re: WWW::Mechanize and file upload
by nosbod (Scribe) on Jan 05, 2007 at 21:45 UTC
    the page that is returned states that the file was not uploaded correctly. It states that the file my be in the wrong format or that there was a problem with the upload. It's not in the wrong format, i've tried it manually, it's fine.

    is there an obvious error with the code? the docs don't really talk about file uploads. i assume it can be done but the docs aren't particularly specific toher than the sentence:

    "If the field is of type file (file upload field), the value is always cleared to prevent remote sites from downloading your local files. To upload a file, specify its file name explicitly."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2024-03-28 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found