summaryrefslogtreecommitdiff
path: root/swiftclient/shell.py
diff options
context:
space:
mode:
Diffstat (limited to 'swiftclient/shell.py')
-rwxr-xr-xswiftclient/shell.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/swiftclient/shell.py b/swiftclient/shell.py
index 43fcf47..d02c709 100755
--- a/swiftclient/shell.py
+++ b/swiftclient/shell.py
@@ -947,6 +947,8 @@ Optional arguments:
def st_upload(parser, args, output_manager):
+ DEFAULT_STDIN_SEGMENT = 10 * 1024 * 1024
+
parser.add_argument(
'-c', '--changed', action='store_true', dest='changed',
default=False, help='Only upload files that have changed since '
@@ -1060,6 +1062,12 @@ def st_upload(parser, args, output_manager):
st_upload_help)
return
+ if from_stdin:
+ if not options['use_slo']:
+ options['use_slo'] = True
+ if not options['segment_size']:
+ options['segment_size'] = DEFAULT_STDIN_SEGMENT
+
options['object_uu_threads'] = options['object_threads']
with SwiftService(options=options) as swift:
try: