mirror of
https://github.com/curl/curl.git
synced 2026-07-31 03:08:08 +03:00
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
This commit is contained in:
parent
fa176376c8
commit
2698520aef
7 changed files with 316 additions and 113 deletions
11
docs/curl.1
11
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue