ListObjects: IsTruncated omit when its value is false
mars4myshare opened this issue · 2 comments
mars4myshare commented
Issue
When listObjects, if the number of objects is less than the 'MaxKeys', there is no 'IsTruncated' field
Detail
There were two objects in the bucket. Here is the return of listObjects
{
Contents: [{
ETag: "\"d084225e6144cafa320aa8454349094d\"",
Key: "test1.txt",
LastModified: 2019-12-26 08:11:40.466 +0000 UTC,
Size: 56
},{
ETag: "\"d084225e6144cafa320aa8454349094d\"",
Key: "test2.txt",
LastModified: 2019-12-26 08:11:40.467 +0000 UTC,
Size: 56
}],
Marker: "",
MaxKeys: 3,
Name: "newbucket",
Prefix: ""
}
Expected return:
{
Contents: [{
ETag: "\"d084225e6144cafa320aa8454349094d\"",
Key: "test1.txt",
LastModified: 2019-12-26 08:44:01.079 +0000 UTC,
Size: 56
},{
ETag: "\"d084225e6144cafa320aa8454349094d\"",
Key: "test2.txt",
LastModified: 2019-12-26 08:44:01.079 +0000 UTC,
Size: 56
}],
IsTruncated: false,
Marker: "",
MaxKeys: 3,
Name: "newbucket",
Prefix: ""
}
mars4myshare commented
Fixed with #39
Now the return is
{
Contents: [{
ETag: "\"d084225e6144cafa320aa8454349094d\"",
Key: "test1.txt",
LastModified: 2019-12-26 08:44:01.079 +0000 UTC,
Size: 56
},{
ETag: "\"d084225e6144cafa320aa8454349094d\"",
Key: "test2.txt",
LastModified: 2019-12-26 08:44:01.079 +0000 UTC,
Size: 56
}],
IsTruncated: false,
Marker: "",
MaxKeys: 3,
Name: "newbucket",
Prefix: ""
}
johannesboyne commented
(s.a. fixed with #39 - merged)