diff options
author | Timur Alperovich <timuralp@swiftstack.com> | 2017-06-15 20:53:04 -0700 |
---|---|---|
committer | Timur Alperovich <timuralp@swiftstack.com> | 2017-07-26 17:04:19 -0700 |
commit | 0982791db2ccb851f277ffa653065e4021e52b3f (patch) | |
tree | a8b0765c81c6e96309b8b109858abb85bc909415 /doc | |
parent | 124c7de67669ad314f7357a2d845c2bf4e2397ca (diff) | |
download | python-swiftclient-0982791db2ccb851f277ffa653065e4021e52b3f.tar.gz |
Allow for uploads from standard input.
If "-" is passed in for the source, python-swiftclient will upload
the object by reading the contents of the standard input. The object
name option must be set, as well, and this cannot be used in
conjunction with other files.
This approach stores the entire contents as one object. A follow on
patch will change this behavior to upload from standard input as SLO,
unless the segment size is larger than the content size.
Change-Id: I1a8be6377de06f702e0f336a5a593408ed49be02
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manpages/swift.1 | 7 | ||||
-rw-r--r-- | doc/source/cli/index.rst | 8 |
2 files changed, 9 insertions, 6 deletions
diff --git a/doc/manpages/swift.1 b/doc/manpages/swift.1 index f772382..00e1440 100644 --- a/doc/manpages/swift.1 +++ b/doc/manpages/swift.1 @@ -63,8 +63,11 @@ Uploads to the given container the files and directories specified by the remaining args. The \-c or \-\-changed is an option that will only upload files that have changed since the last upload. The \-\-object\-name <object\-name> is an option that will upload file and name object to <object\-name> or upload dir -and use <object\-name> as object prefix. The \-S <size> or \-\-segment\-size <size> -and \-\-leave\-segments and others are options as well (see swift upload \-\-help for more). +and use <object\-name> as object prefix. If the file name is "-", reads the +content from standard input. In this case, \-\-object\-name is required and no +other files may be given. The \-S <size> or \-\-segment\-size <size> and +\-\-leave\-segments and others are options as well (see swift upload \-\-help +for more). .RE \fBpost\fR [\fIcommand-options\fR] [\fIcontainer\fR] [\fIobject\fR] diff --git a/doc/source/cli/index.rst b/doc/source/cli/index.rst index bded349..bec1f5e 100644 --- a/doc/source/cli/index.rst +++ b/doc/source/cli/index.rst @@ -369,10 +369,10 @@ given container. The ``-c`` or ``--changed`` is an option that will only upload files that have changed since the last upload. The ``--object-name <object-name>`` is an option that will upload a file and name object to ``<object-name>`` or upload a directory and use ``<object-name>`` -as object prefix. The ``-S <size>`` or ``--segment-size <size>`` and -``--leave-segments`` are options as well (see ``--help`` for more). - -Uploads specified files and directories to the given container. +as object prefix. If the file name is "-", client reads content from standard +input. In this case ``--object-name`` is required to set the name of the object +and no other files may be given. The ``-S <size>`` or ``--segment-size <size>`` +and ``--leave-segments`` are options as well (see ``--help`` for more). **Positional arguments:** |