-
Notifications
You must be signed in to change notification settings - Fork 549
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
S3 TransferUtility : incorrect support for object tagging on single/multipart upload #541
Comments
@fdelaporte Sorry for the inconvenience caused. I'm looking into reproducing the issue. |
@kvasukib That's allright. As of now I'm using metadata to work around the problem. I initially intended to use tagging inside a lambda triggered by S3 object creation, so in the mean time I'm juste getting object headers instead of tags. Please let me know if you need clarifications. Thanks |
@fdelaporte When you say "I'm using metadata to work around the problem", can you post a code snippet of how you are accomplishing this? |
@kvasukib Sorry that wasn't clear. What I meant by that is that I'm setting the values I need through metadata instead of tagging, not that I had found a way to put tagging somehow. So for instance if I need the tag myKey=myValue, instead of doing: I can do instead: And then I can fetch the The point was to say that in my scenario this bug is not show stopper. |
@fdelaporte Thank you for the confirmation. The intention of the SDK is to support |
@fdelaporte Sorry for the delayed response. I am able to reproduce the issue successfully. Single-part upload: ObjectMetadata objectMetadata = new ObjectMetadata();
objectMetadata.addUserMetadata("x-amz-tagging", "key1=value1"); // Appears on Metadata and Tags on S3 Console
objectMetadata.addUserMetadata("key2", "value2"); // Appears only on Metadata
TransferObserver observer = transferUtility.upload(
file.getName(),
file,
objectMetadata
); Multi-part upload: ObjectMetadata objectMetadata = new ObjectMetadata();
objectMetadata.addUserMetadata("x-amz-tagging", "key1=value1"); // Appears on Metadata only on S3 Console
objectMetadata.addUserMetadata("key2", "value2"); // Appears only on Metadata
TransferObserver observer = transferUtility.upload(
file.getName(),
file,
objectMetadata
); I see that for multi-part uploads, the Tags miss the key1=value1. I will look into fixing it. |
This was released on 2.15.1. Please let us know if you continue to have problems. |
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems. |
Describe the bug
Object tagging is not set when uploading files with size > 5MB
When file size is > 5MB there is only a
x-amz-meta-x-amz-tagging
metadata header set with actual tagging contentWhen file size is < 5MB, the tagging is correctly set but the wrong
x-amz-meta-x-amz-tagging
header is still set in addition to taggingTo Reproduce
For multipart upload:
addUserMetadata("x-amz-tagging", "key=value")
TransferUtility.upload(bucket, key, file, objectMetadata)
x-amz-meta-x-amz-tagging
headerFor single part upload:
addUserMetadata("x-amz-tagging", "key=value")
TransferUtility.upload(bucket, key, file, objectMetadata)
x-amz-meta-x-amz-tagging
header also presentExpected behavior
There should be no
x-amz-meta-x-amz-tagging
header in any case, and tagging should be set for multipart uploadEnvironment:
Device Information (please complete the following information):
The text was updated successfully, but these errors were encountered: