From 2698520aef593cbd746a64f79021a4c8d7c83d65 Mon Sep 17 00:00:00 2001 From: Ulion Date: Mon, 21 Jan 2013 23:20:09 +0100 Subject: formpost: support quotes, commas and semicolon in file names - document the double-quote and backslash need be escaped if quoting. - libcurl formdata escape double-quote in filename by backslash. - curl formparse can parse filename both contains '"' and ',' or ';'. - curl now can uploading file with ',' or ';' in filename. Bug: http://curl.haxx.se/bug/view.cgi?id=1171 --- docs/curl.1 | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs') diff --git a/docs/curl.1 b/docs/curl.1 index a13291c0b..c2b6887d2 100644 --- a/docs/curl.1 +++ b/docs/curl.1 @@ -484,6 +484,17 @@ filename=, like this: \fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com +If filename/path contains ',' or ';', it must be quoted by double-quotes like: + +\fBcurl\fP -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" url.com + +or + +\fBcurl\fP -F 'file=@"localfile";filename="nameinpost"' url.com + +Note that if a filename/path is quoted by double-quotes, any double-quote +or backslash within the filename must be escaped by backslash. + See further examples and details in the MANUAL. This option can be used multiple times. -- cgit v1.2.3