curl-users
Re: Fwd: cURL request file upload
Date: Wed, 3 Aug 2011 16:09:40 -0400
Greetings;
Thanks for your feedback. Made a few changes, and the "-d" helped as well.
Have a great day!
Reginald
On Wed, Aug 3, 2011 at 12:03 AM, Dan Fandrich <dan_at_coneharvesters.com>wrote:
> On Tue, Aug 02, 2011 at 11:23:11PM -0400, Reginald Baugh wrote:
> > I am attempting to upload a file to a client's server through cURL using
> an
> > HTTP request. The file indeed uploads to the server, however it seem
> some
> > server header info gets embedded within the file. Need assistance in
> removing
> > the embedded headers in the file (lines 1-3 in image below).
> >
> > Upload Code:
> >
> > E:\BSG\EXE\curl -k -b E:\BSG\SEND\CLAIMS\ALMPhy\cookie.txt -c
> E:\BSG\SEND\
> > CLAIMS\ALMPhy\cookie.txt --header "X-filename: 009872939_358.TXT"
> --header
> > "X-cde_identification:X12_NCPDP_BATCH" --header "X-checksum: FFFFFFFF"
> -F
> > myFile=@E:\BSG\SEND\CLAIMS\ALMPhy\009872939_358.TXT
> https://www.alabama-uat.com
> > /BatchUpload.aspx
> >
> > File Received by Client server: First 3 lines are not intended and the
> process
> > embeds them.
> >
> > (File Line)
> > 1 -------------------------------1adcbc0b601
> > 2 Content-Disposition: form-data; name="myfile";
> filename="009872939_358.TXT"
> > 3 Content-Type: text/plain
> > 4
> > 5 ISA*00* *00* *ZZ*300002908
> > *ZZ*752548221
> > 6 GS*HC*300002908*752548221*20110728
>
> It sounds like the server doesn't want a multipart post. Try using the -d
> option instead of -F.
>
> >>> Dan
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-03