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

feat: Allow passing content_type to OSS presign #1252

Merged
merged 5 commits into from
Jan 29, 2023

Conversation

flaneur2020
Copy link
Contributor

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Currently, there's no content-type header at all in the current presign operation. However, browsers have a limit about there's no way to NOT passing Content-Type on a fetch() operation. Thus it's hard to do upload presigned urls in a website.

This PR allows passing content-type on presign write operations:

  • addes presign_write_with method to Object
  • passes the content_type argument on presigning write operations

fixes #421

@flaneur2020 flaneur2020 changed the title Allow passing content_type to OSS presign feat: Allow passing content_type to OSS presign Jan 29, 2023
@flaneur2020 flaneur2020 marked this pull request as ready for review January 29, 2023 10:09
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Catch!

@Xuanwo Xuanwo merged commit 06b3bdb into apache:main Jan 29, 2023
@flaneur2020 flaneur2020 deleted the try-add-set-content-type branch January 29, 2023 12:36
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

Successfully merging this pull request may close these issues.

Allow user passing extra keys while presign
2 participants