Hi,
I'm trying to upload a file through the HTTP::Request::Common using the POST method by changing the type to 'form-data' etc.. But instead of going to the next page,I'm getting an error message "Error while sending the Email 006~ASP 0207~Cannot use Request.Form~Cannot use Request.Form collection after calling BinaryRead."
Thing is, even if I use the browser manually, the upload works only in IE and not in firefox. Using Live HTTP Headers, I've pasted the headers sent below and have also pasted the POST section of my Perl code. Pls hav a look and lemme know what I need to change for transition to the next page without gettig this error msg:
In I.E:
(Method-Line) POST /NOTIS/IPAllocation/IPAllocNetsUploadProcess.asp
+ HTTP/1.1
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, applica
+tion/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-
+powerpoint, application/msword, */*
Referer https://netinfo.ti.citigroup.net/NOTIS/IPAllocation/IPAlloc
+NetsUpload.asp
Accept-Language en-us
Content-Type multipart/form-data; boundary=------------------------
+---7d72422611022c
UA-CPU x86
Accept-Encoding gzip, deflate
User-Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoP
+ath.1; .NET CLR 2.0.50727)
Host netinfo.ti.citigroup.net
Content-Length 64340
Connection Keep-Alive
Cache-Control no-cache
Content-Disposition: form-data; name="file1"; filename="10.26.0.0.csv"
Perl Code:
$mech->request(POST 'https://netinfo.ti.citigroup.net/NOTIS/IPAllocati
+on/IPAllocNetsUploadProcess.asp',
Content_Type => 'form-data',
Content => ["file1" => ["C:/Scripting/Upload/10.26.0.0.csv
+" => "10.26.0.0.csv" => "application/vnd.ms-excel"],
"submit2" => "Upload",
]);
print $mech->content;