cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: How to add filename field in multipart/form-data POST

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 29 Nov 2012 09:07:32 +0100 (CET)

On Wed, 28 Nov 2012, Yu Gong wrote:

> I tried to POST data using the content-type multipart/form-data to a Web
> server while failed because of the lack of field "filename=xxx", which is
> required by the server. Could you please let me know how I can add it to my
> POST data? I didn't find the related information in cURL manual.

The "normal" -F upload=@foo style adds that by itself. Can you show us the
command line you used?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
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 2012-11-29