in reply to Uploading a file via LWP

i got this to work just fine on one of my image-uploading galleries. i think you've simply formatted your data structure incorrectly. the documentation is a bit confusing as it mentions the structure you use and then the one i used. nonetheless, seems to work.
#!perl -wl use strict; use HTTP::Request::Common qw(POST); use LWP::UserAgent; use Data::Dumper; my $ua = LWP::UserAgent->new; my $req = POST( "http://parseerror.com/images/" ,"Content_Type" => "form-data" ,"Content" => [ "image_file" => [ "uploadme.gif" ] ] ); my $res = $ua->request($req); print $res->as_string;

perl -e'$_="nwdd\x7F^n\x7Flm{{llql0}qs\x14";s/./chr(ord$&^30)/ge;print'

Replies are listed 'Best First'.
Re: Re: Uploading a file via LWP
by Anonymous Monk on May 03, 2004 at 14:23 UTC
    Great. It worked like a charm.!! Many thanks to you..