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

Metadata in presigned links not working #4281

Open
mrpotato3 opened this issue Feb 19, 2022 · 0 comments
Open

Metadata in presigned links not working #4281

mrpotato3 opened this issue Feb 19, 2022 · 0 comments

Comments

@mrpotato3
Copy link

Bug report information

When I create a signed link with metadata it generates the link correctly but does not insert the metadata when upload file.

Steps to reproduce the issue

Direct file upload code (working as expected):

const command = new PutObjectCommand({
  Bucket: 'bucket',
  Key: 'test',
  Body: 'Test content...',
  Metadata: {
    a: 'a',
    b: 'b',
    c: 'c'
  },
})
const r3 = await storage.send(command)

Presigned link with metadata generation:

const command = new PutObjectCommand({
  Bucket: 'bucket',
  Key: 'test',
  Metadata:  {
    a: 'a',
    b: 'b',
    c: 'c'
  },
})
const uploadLink = await getSignedUrl(storage, command, { expiresIn: 300 })

Output link (correct):

https://host.tld/bucket/test?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=12345%2F20220219%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220219T101832Z&X-Amz-Expires=300&X-Amz-Signature=24ee6287286fc65b462043e671d9f4c298caf0a6e70bab3eccfddd1dfcba760d&X-Amz-SignedHeaders=host&x-amz-meta-a=a&x-amz-meta-b=b&x-amz-meta-c=c&x-id=PutObject

Actual result (no metadata)

image

Expected result

image

Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant