FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

S3 Copy does not encode object keys · Issue #32 · webiny/data-transfer · GitHub

S3 Copy does not encode object keys #32

Description

The CopySource parameter to copy an S3 object requires the key name to be URL-encoded. The S3 copy job doesn't do this:

services/S3Client/S3Client.js:32-37

const command = new CopyObjectCommand({
    CopySource: `${options.sourceBucket}/${options.sourceKey}`,
    ...
});

This means that any non URL-safe characters in object keys don't get correctly encoded, causing their copy to fail.

Fix: percent-encode each path segment individually (sourceKey.split("/").map(encodeURIComponent).join("/")), preserving literal / separators between folder levels — encodeURIComponent on the whole path would wrongly escape those as %2F too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL