Skip to content
This repository was archived by the owner on Feb 12, 2021. It is now read-only.
This repository was archived by the owner on Feb 12, 2021. It is now read-only.

NoSuchKey when trying to use client.moveObject #200

Open
@mexin

Description

@mexin

Im having trouble moving files using .moveObject... I have added the parameters like this, but still every time I get the same error message, file is indeed in the bucket as I use client.listObjects(params) to get the Key and send it to client.moveObject(params) CopySource

const params = {
        Bucket: 'bucket-name',
        CopySource: `bucket-name/${fileKey}`,
        Key: fileKey.replace(oldPrefix, newPrefix),
    };
    const moveFile = client.moveObject(params);

** Editted
My files had "+" on them so I had to use encodeURIComponent() and that seems to solved it, now Im getting MethodNotAllowed: The specified method is not allowed against this resource. which seems its due client.deleteObject() did I miss anything?

Thanks

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