in reply to Cannot post image using LWP

My first guess would be an ASCII vs. binary issue. Is your Perl script running on Windows? Are you uploading to a Windows server? If your Perl script is running on Windows, you could try something like
# untested open my $imagefh, '<', $imageFullPath; binmode $imagefh; my $imagedata = do { local $/; <$imagefh> }; close $imagefh; my $imageBody = $CONFIGURATION->{filekey}=>[$imageFullPath,$imageFi +leName,'Content-Type'=>$contentType,Content=>$imagedata]];

Replies are listed 'Best First'.
Re^2: Cannot post image using LWP
by Anonymous Monk on Nov 21, 2007 at 13:51 UTC