Urgent Help needed with Post method file upload

"Eric Langheinrich" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <001b01c5a02f$ec7784d0$0800a8c0@UNSPAM1>
I'm attempting to post a file in a multipart/form-data post using LWP::UserAgent and the following command string:

 my $response = $ua->request(POST $baseurl, Content_Type => 'form-data', Content => [ request_params => $task_add_postkey, datafile => [$task_add_datakey] ]);


Where $task_add_postkey is a set of key value pairs of form data, and $task_add_datakey is the full path file name of a file containing binary data. The post seems to work fine with the exception of the 48 byte file I am sending, is received as 61 bytes on the server. I'm assuming it has something to do with how the file is being parsed. 

Is there a better way to put together a multipart post? Am I missing something obvious? Is there a way to control the file parser so that the data is handled as raw binary data? 

Any ideas????

Thanks in advance..

Eric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.