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

Provide content-type while putting object to S3 #204

Conversation

aliabdikk
Copy link
Contributor

Issue #194:
S3WritableByteChannel does not consider contentType while putting an object into the bucket

Description of changes:
Upon putting an object into the S3 bucket (for instance, while copying), we need to also provide the content-type of the file. This could come crucial in cases like when the uploaded file (let's say an XML file) is going to be used by a specific application later.
While checking the implementation of PutObjectRequest, I didn't fine anywhere that contentType acquires a default value, so if Files::probeContentType returns a null value, it is the same as not calling the builder method. Hence I don't see any negative side-effects with this change.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…g), we need to also provide the content-type of the file. This could come crucial in cases like when the uploaded file (let's say an XML file) is going to be used by a specific application later.
Copy link
Contributor

@markjschreiber markjschreiber left a comment

Choose a reason for hiding this comment

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

Thanks for this

@markjschreiber markjschreiber merged commit 9456056 into awslabs:main Oct 4, 2023
1 check passed
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.

2 participants