aws-sdk-java
aws-sdk-java copied to clipboard
resovles #1648 set content type multipart upload
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. https://github.com/spring-cloud/spring-cloud-aws/issues/262.