Skip to content

ListObjectsResponse.commonPrefixes is always empty #52

Open
@lionel-rowe

Description

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/" },
]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions