From 4dd75e1eed0227755b0382d803313e818a46ee58 Mon Sep 17 00:00:00 2001 From: MajoBerger <88670521+MajoBerger@users.noreply.github.com> Date: Wed, 6 Mar 2024 13:56:48 +0100 Subject: [PATCH] fixed upload of big file (#131) use bundle id instead of item id --- tools/create_bitstreams/create_bitstreams.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/create_bitstreams/create_bitstreams.py b/tools/create_bitstreams/create_bitstreams.py index 9221f6b..330e0d1 100644 --- a/tools/create_bitstreams/create_bitstreams.py +++ b/tools/create_bitstreams/create_bitstreams.py @@ -182,7 +182,8 @@ def _link(uuid): with open(BIG_FILE_PATH, 'wb') as f: f.seek(big_size) f.write(b'\0') + b = get_bundle(dspace_be, item_big_file) dspace_be.client.create_bitstream( - item_big_file, BIG_FILE_PATH, BIG_FILE_PATH, MULTIPART_CONTENT_TYPE) + b, BIG_FILE_PATH, BIG_FILE_PATH, MULTIPART_CONTENT_TYPE) _logger.info(f"Created [{item_big_file.handle}] [{item_big_file.uuid}] with BIG file") remove_file(BIG_FILE_PATH)