POST-ing a file with WWW::Mechanize

POST-ing a file with WWW::Mechanize

am 03.06.2007 09:07:31 von pknewsgroups

--------------020502050807000403070702
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello!

When POST-ing files with LWP I could usually specify the field as an
array ref which looked like this:
/fieldname/ => [/local_filespec/ => /as_what_name/],

Now, I am trying to do the same with WWW::Mech and what I get is Mech
dying with error:
/Can't call method "value" on an undefined value at WWW/Mechanize.pm
line 1347./

Any ideas what to associate a field with to POST a file with
'/as_what_name/' just like in the LWP case?

Using WWW::Mech version 1.30


Thanks,
P.Krumins

--------------020502050807000403070702--

Re: POST-ing a file with WWW::Mechanize

am 03.06.2007 15:40:54 von Andy

>
> Any ideas what to associate a field with to POST a file with '/
> as_what_name/' just like in the LWP case?

I don't know about your previous verison, but what you want
is :content_file in LWP::UserAgent. I think it's discussed in the FAQ.

--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance