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
Multipart file upload content type #1648
Comments
Hey i found some work arounds for this, you can either call the s3 rest api directly which will work properly, or you can provide the content type when you initiate the multipart upload eg: //setting object metadata to have your file content type
ObjectMetadata objectMetadata = new ObjectMetadata();
objectMetadata.setContentType("video/mp4");
// Initiate the multipart upload.
InitiateMultipartUploadRequest initRequest = new InitiateMultipartUploadRequest(
bucket,
key,
objectMetadata
); code to uploadPart and also to complete remains the same |
Just a quick update letting you know that the SDK team has reviewed the feature request list for V1 and this looks like a great candidate for a community PR, which we’ll help merge in and support. |
I can have a stab at it @debora-ito |
I would like help in contributing for this issue. Please message me if you have any questions. I can begin working on it. |
It looks like the normal
putObject
method on the S3 client will add a content-type header for you if one is missing. This is super helpful and I couldn't see this behaviour in theinitiateMultipartUpload
method. All the files I've uploaded end up having the content-type set toapplication/octet-stream
I'm currently using the AmazonS3 interface via the https://github.com/spring-cloud/spring-cloud-aws project and it's not possible to set the ObjectMetadata there.
Would it be possible to add this functionality to the
initiateMultipartUpload
method, as I can see the rest api supports that header?The text was updated successfully, but these errors were encountered: