aboutsummaryrefslogtreecommitdiff
path: root/docs/cmdline-opts/upload-file.d
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-11-28 01:01:13 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-11-28 09:53:15 +0100
commita387d881ecf1cfe8def1460fdf2faa3fdef66302 (patch)
tree58148de3354cb8522e90e42a95e6243a7543c8e9 /docs/cmdline-opts/upload-file.d
parentac85f332f13f2e105e69d5f4b97c1787a824f637 (diff)
cmdline-docs: more options converted and fixed
Now all options are in the new system.
Diffstat (limited to 'docs/cmdline-opts/upload-file.d')
-rw-r--r--docs/cmdline-opts/upload-file.d33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/cmdline-opts/upload-file.d b/docs/cmdline-opts/upload-file.d
new file mode 100644
index 000000000..6f01dbf35
--- /dev/null
+++ b/docs/cmdline-opts/upload-file.d
@@ -0,0 +1,33 @@
+Long: upload-file
+Short: T
+Arg: <file>
+Help: Transfer local FILE to destination
+---
+This transfers the specified local file to the remote URL. If there is no file
+part in the specified URL, curl will append the local file name. NOTE that you
+must use a trailing / on the last directory to really prove to Curl that there
+is no file name or curl will think that your last directory name is the remote
+file name to use. That will most likely cause the upload operation to fail. If
+this is used on an HTTP(S) server, the PUT command will be used.
+
+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.
+
+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
+multiple files to a single URL by using the same URL globbing style supported
+in the URL, like this:
+
+ curl --upload-file "{file1,file2}" http://www.example.com
+
+or even
+
+ curl -T "img[1-1000].png" ftp://ftp.example.com/upload/
+
+When uploading to an SMTP server: the uploaded data is assumed to be RFC 5322
+formatted. It has to feature the necessary set of headers and mail body
+formatted correctly by the user as curl will not transcode nor encode it
+further in any way.