Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListObjectsResponse.commonPrefixes is always empty #52

Open
lionel-rowe opened this issue Feb 15, 2023 · 0 comments · May be fixed by #53 or #55
Open

ListObjectsResponse.commonPrefixes is always empty #52

lionel-rowe opened this issue Feb 15, 2023 · 0 comments · May be fixed by #53 or #55

Comments

@lionel-rowe
Copy link

lionel-rowe commented Feb 15, 2023

Given the following response XML (sample response from docs for ListObjectsV2 - Amazon Simple Storage Service):

<?xml version='1.0' encoding='utf-8' ?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Name>example-bucket</Name>
  <Prefix>photos/2006/</Prefix>
  <Marker></Marker>
  <MaxKeys>1000</MaxKeys>
  <Delimiter>/</Delimiter>
  <IsTruncated>false</IsTruncated>
  <CommonPrefixes>
    <Prefix>photos/2006/February/</Prefix>
  </CommonPrefixes>
  <CommonPrefixes>
    <Prefix>photos/2006/January/</Prefix>
  </CommonPrefixes>
</ListBucketResult>

(await bucket.listObjects(...)).commonPrefixes gives:

[
    { prefix: undefined },
]

Expected:

[
    { prefix: "photos/2006/February/" },
    { prefix: "photos/2006/January/" },
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant