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;

In reply to FILE UPLOAD by Battle_Fury

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.