]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
upload-file.d: describe the file name slash/backslash handling
authorDaniel Stenberg <daniel@haxx.se>
Thu, 21 Sep 2023 15:46:12 +0000 (17:46 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 21 Sep 2023 21:07:35 +0000 (23:07 +0200)
Closes #11911

docs/cmdline-opts/upload-file.d

index e89390ab8c71c4e4f61feff0ae9bf18f5fdbf6c1..8e0091d18d4ffeda1266c5f48b123cd53f50fbe2 100644 (file)
@@ -9,7 +9,7 @@ Example: -T file $URL
 Example: -T "img[1-1000].png" ftp://ftp.example.com/
 Example: --upload-file "{file1,file2}" $URL
 Added: 4.0
-See-also: get head
+See-also: get head request data
 Multi: append
 ---
 This transfers the specified local file to the remote URL.
@@ -18,13 +18,19 @@ If there is no file part in the specified URL, curl appends the local file
 name to the end of the URL before the operation starts. You must use a
 trailing slash (/) on the last directory to prove to curl that there is no
 file name or curl thinks that your last directory name is the remote file name
-to use. If this is used on an HTTP(S) server, the PUT command is used.
+to use.
+
+When putting the local file name at the end of the URL, curl ignores what is
+on the left side of any slash (/) or backslash (\\) used in the file name and
+only appends what is on the right side of the rightmost such character.
 
 Use the file name "-" (a single dash) to use stdin instead of a given file.
 Alternately, the file name "." (a single period) may be specified instead of
 "-" to use stdin in non-blocking mode to allow reading server output while
 stdin is being uploaded.
 
+If this option is used with a HTTP(S) URL, the PUT method is used.
+
 You can specify one --upload-file for each URL on the command line. Each
 --upload-file + URL pair specifies what to upload and to where. curl also
 supports "globbing" of the --upload-file argument, meaning that you can upload