Skip to content

Commit

Permalink
fix: getBucketVersions should use NextKeyMarker property (#896)
Browse files Browse the repository at this point in the history
* fix: getBucketVersions should use NextKeyMarker property

* docs: getBucketVersions should use NextKeyMarker property

* docs: Compatible wrong property
  • Loading branch information
beajer authored Nov 26, 2020
1 parent db4969e commit b9076d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2325,8 +2325,8 @@ Success will return objects list on `objects` properties.
- lastModified {String} object last modified GMT date, e.g.: `2015-02-19T08:39:44.000Z`
- versionId {String} object versionId
- isTruncated {Boolean} truncate or not
- nextMarker {String} next marker string
- NextVersionIdMarker {String} next version ID marker string
- nextKeyMarker (nextMarker) {String} next marker string
- nextVersionIdMarker (NextVersionIdMarker) {String} next version ID marker string
- res {Object} response info, including
- status {Number} response status
- headers {Object} response headers
Expand Down
6 changes: 5 additions & 1 deletion lib/common/object/getBucketVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ async function getBucketVersions(query = {}, options = {}) {
objects,
deleteMarker,
prefixes,
nextMarker: result.data.NextMarker || null,
// attirbute of legacy error
nextMarker: result.data.NextKeyMarker || null,
// attirbute of legacy error
NextVersionIdMarker: result.data.NextVersionIdMarker || null,
nextKeyMarker: result.data.NextKeyMarker || null,
nextVersionIdMarker: result.data.NextVersionIdMarker || null,
isTruncated: result.data.IsTruncated === 'true'
};
}
Expand Down

0 comments on commit b9076d4

Please sign in to comment.