cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: File NOT Uploading

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 25 Apr 2011 12:55:15 -0700

On Mon, Apr 25, 2011 at 11:45:46AM -0400, Reginald Baugh wrote:
> After logging into a website portal, the process then attempts to upload a
> file.
> The below script is the portion that attempts to upload the file, however it
> doesn't complete successfully.
> No errors are generated, and the command prompt returns file size bytes like it
> can locate the file, attempts to load it, however doesn't complete uploading
> the data. Please Help lol!
>
> C:\_Dev\BSG\EXE\curl -k -e https://mn-its.dhs.state.mn.us/mailbox_secondgen_web
> /submitSubmitTransactionsLayout.faces -F
> "submitTransactions:form1:j_id_jsp_1394483310_9pc2:0:fileForUpload=@C:\_Dev\BSG
> \SEND\CLAIMS\MNMPHY\837Test.txt;
> submitTransactions:form1:j_id_jsp_1394483310_9pc2:0:menu1=workspace://
> SpacesStore/40f92357-41e6-48d2-bb02-9ea55b18ecb3;
> submitTransactions:form1:j_id_jsp_1394483310_9pc2:0:j_id_jsp_1394483310_25pc2=
> THISISATESTREG;submitTransactions:form1:uploadFile=Upload+&amp+Submit" -L
> https://mn-its.dhs.state.mn.us/mailbox_secondgen_web/
> submitTransactionsLayout.faces -v -o "C:\_Dev\BSG\SEND\CLAIMS\MNMPhy\file.curl"

Try comparing the data sent from curl with the data sent by a web browser,
using something like LiveHttpHeaders or Wireshark. You may need cookies for
this to succeed. The file upload looks pretty suspicious here, too. I don't
think that -F option is going to do what you want. I believe that the option
as given will attempt to upload a file called
C:\_Dev\BSG\SEND\CLAIMS\MNMPHY\837Test.txt;submitTransactions:form1:j_id_jsp_1394483310_9pc2:0:menu1=workspace://...
etc.

>>> 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
Received on 2011-04-25