From dbdee8fa850b8c41249c22dc44b1bd6d3116a06d Mon Sep 17 00:00:00 2001 From: Florent Viard Date: Wed, 20 Dec 2023 00:13:08 +0100 Subject: [PATCH] Fixes #1360 - paging not working correctly for multipart command When listing multipart uploads over multiple pages, "key-marker" and "upload-id-marker" are the correct names for the query parameters to go to the next page. --- S3/S3.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/S3/S3.py b/S3/S3.py index 87cee70d..d4cac8f9 100644 --- a/S3/S3.py +++ b/S3/S3.py @@ -1411,22 +1411,22 @@ def get_multipart_streaming(self, uri, uri_params=None, limit=-1): next_key = getTextFromXml(xml_data, "NextKeyMarker") if not next_key: next_key = upload_list[-1]["Key"] - uri_params['KeyMarker'] = next_key + uri_params['key-marker'] = next_key upload_id_marker = getTextFromXml( xml_data, "NextUploadIdMarker") if upload_id_marker: - uri_params['UploadIdMarker'] = upload_id_marker - elif 'UploadIdMarker' in uri_params: + uri_params['upload-id-marker'] = upload_id_marker + elif 'upload-id-marker' in uri_params: # Clear any pre-existing value - del uri_params['UploadIdMarker'] + del uri_params['upload-id-marker'] else: # Unexpectedly, the server lied, and so the previous # response was not truncated. So, no new key to get. yield False, upload_list break debug("Listing continues after '%s'" % - uri_params['KeyMarker']) + uri_params['key-marker']) else: yield truncated, upload_list break