From 6959835012f03a67afccf42bd6e32c4bdede68af Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sun, 7 Apr 2024 03:51:33 +0000 Subject: [PATCH] Fix single-part upload --- ia-upload-stream | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ia-upload-stream b/ia-upload-stream index bfe0671..540f78b 100755 --- a/ia-upload-stream +++ b/ia-upload-stream @@ -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