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

resovles #1648 set content type multipart upload #2672

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JasonVoss
Copy link

@JasonVoss JasonVoss commented Nov 22, 2021

Resolves #1648

The issue is a feature request calling for automatically setting the content-type header of a multipart upload. Similar to how the putObject method in the S3Client does it, by using the file extension. Multipart uploads happen in 3 parts, initiate, send parts, and close. The initiate does not take a file. Initiate allows setting the content type in the object metadata. I expect that initiateMultipartUpload will continue to determine content type from object metadata. This seems like a fine way to do it, but I see there is still an open issue here, and is flagged for community help-wanted. I added helper methods to set the content type given a file that will upload. I kept the method name long and descriptive to show this is setting the content type in the object metadata, while there is still the existing setters to set the metadata. Use of existing methods is not disrupted or changed in any way.

Also, I see there are no unit tests in the src code, but I also read in gitter that unit tests are welcome in pull requests. I can remove those if needed.

In the issue #1648, the question was because spring-cloud-aws was not allowing the user to set the content type. This has since been fixed. spring-attic/spring-cloud-aws#262.

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.

Multipart file upload content type
1 participant