Browse Source

Fix single-part upload

master
JustAnotherArchivist 3 weeks ago
parent
commit
6959835012
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ia-upload-stream

+ 1
- 1
ia-upload-stream View File

@@ -241,7 +241,7 @@ def upload(item, filename, metadata, *, iaConfigFile = None, partSize = 100*1024
# If the file is only a single part anyway, use the normal PUT API instead of multipart because IA can process that *much* faster.
if uploadId is None and parts is None and complete and size < partSize:
logger.info(f'Uploading in one piece ({size} bytes)')
partNumber, eTag = upload_one(url, None, 0, data, contentMd5, size, {**initialHeaders, **extraHeaders}, progress, tries, partTimeout)
partNumber, eTag, _ = upload_one(url, None, 0, data, contentMd5, size, {**initialHeaders, **extraHeaders}, progress, tries, partTimeout)
logger.info(f'Upload OK, ETag: {eTag}')
logger.info('Done!')
return


Loading…
Cancel
Save