in reply to How to do an HTTP post for multiple files using HTTP::Request::Common ?
my @files = ("C:/foo.jpg", "C:/bar.jpg"); my $ua = LWP::UserAgent->new(); my $req = POST $url, Content_Type => 'form-data', Content => [ submit => 1, (map { "file".($_+1) => [ $files[$_] ] } 0..$#files), ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to do an HTTP post for multiple files using HTTP::Request::Common ?
by roadrunner (Acolyte) on Nov 23, 2007 at 21:19 UTC |