Skip to content

Commit

Permalink
fix: upgrade urllib to 2.41.0 avoid deps vm2 (#1239)
Browse files Browse the repository at this point in the history
* fix: upgrade urllib to 2.41.0 avoid deps vm2

* fix: upgrade urllib to 2.41.0 avoid deps vm2

* fix: upgrade urllib to 2.41.0 avoid deps vm2

* test: delete bukcet_worm.test.js

* test: delete bukcet_worm.test.js

* test: fix multipartUploadStreams.length test case

---------

Co-authored-by: csg01123119 <csg01123119@alibaba-inc.com>
  • Loading branch information
shungang and csg01123119 authored Aug 18, 2023
1 parent ba227ff commit 7656d6f
Show file tree
Hide file tree
Showing 10 changed files with 2,104 additions and 6,799 deletions.
35 changes: 20 additions & 15 deletions lib/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,21 +266,26 @@ proto.listV2 = async function listV2(query = {}, options = {}) {
if (!Array.isArray(objects)) {
objects = [objects];
}
objects = objects.map(obj => ({
name: obj.Key,
url: that._objectUrl(obj.Key),
lastModified: obj.LastModified,
etag: obj.ETag,
type: obj.Type,
size: Number(obj.Size),
storageClass: obj.StorageClass,
owner: obj.Owner
? {
id: obj.Owner.ID,
displayName: obj.Owner.DisplayName
}
: null
}));

objects = objects.map(obj => {
let owner = null;
if (obj.Owner) {
owner = {
id: obj.Owner.ID,
displayName: obj.Owner.DisplayName
};
}
return {
name: obj.Key,
url: that._objectUrl(obj.Key),
lastModified: obj.LastModified,
etag: obj.ETag,
type: obj.Type,
size: Number(obj.Size),
storageClass: obj.StorageClass,
owner
};
});
}
let prefixes = result.data.CommonPrefixes || null;
if (prefixes) {
Expand Down
Loading

0 comments on commit 7656d6f

Please sign in to comment.