in reply to Help required regarding HTTP::Request::Common, File upload

The advice that you received from me back in November still applies. The advice you got in how to upload a file to a secured website? also applies.

You still don't tell us how it "doesn't work". This is a common approach to errors, but it won't get you far, because we prefer to use your telepaths for controlling the minds of the world leaders instead of reading the minds of programmers.

Looking at the code you post, I only see little resemblance to the code in the synopsis of HTTP::Request::Common:

my $filename = "MyDoc.csv"; my $file = "C:\\" . $filename; $request=POST $upload_url,[ Content_Type => 'multipart/form-data', $file, $file, # what is that suppo +sed to be? Content => [ 'upload' => [$file,$filename]], # please explain thi +s line! submit => 'Upload', Upload => 1, theFile=>$file # ... and this line +too ];

Again, you should likely use WWW::Mechanize instead, which encapsulates file uploads conveniently for you. But you were told that already.

As a different approach, I recommend to use a network sniffer to find out the differences in what the browser sends and what your script sends. But then again, you were told that already, as well.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.