Skip to content

Repeated bucket name in req.file.location - Seems an AWS issue #192

@chuckntaylor

Description

@chuckntaylor

Just a heads up, I was writing out some unit tests today and came across some odd behavior where the bucket name would be repeated in the req.file.location.

For example:

{
  "bucket": "my-bucket",
  "key": "image-folder/some-file-name.png",
  "location": "https://my-bucket.my-bucket.s3.us-east-1.amazonaws.com/image-folder/some-file-name.png",
  ...
}

This appears to be a problem with @aws-sdk/client-s3 and @aws-sdk/util-endpoints

Last week, I had an issue with @aws-sdk/client-s3 aws/aws-sdk-js-v3#4060 where it started saying that it cannot find @aws-sdk/util-endpoints. They have since said the issue is resolved. However, when I use the latest @aws-sdk/client-s3: ^3.196.0 I have the problem mentioned above.

When I roll back to @aws-sdk/client-s3: 3.180.0 all is good.

I just want to bring this to your attention. I was unsure how best to report this to AWS as I wasn't sure where the result callback information for location is generated.

If you do end up filing an issue with aws, I would love to follow it.

Metadata

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