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

fix HTTP header for user-defined object metadata #17

Merged
merged 2 commits into from
Jan 4, 2021

Conversation

philenius
Copy link
Contributor

There was a typo in prependXAMZMeta(). According to the S3 documentation, when adding user-defined object metadata, the metadata key must start with the all-lowercase prefix x-amz-meta-. I also added two unit tests for testing the metadata feature.

See S3 doc: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#UserMetadata

According to the S3 documentation, when adding user-defined
object metadata, the metadata key must start with "x-amz-meta-"
(all lowercase).
@philenius
Copy link
Contributor Author

philenius commented Jan 2, 2021

Regarding the second commit 75d7432:
another bug, that I came across, is that one cannot upload empty files. I'm not 100% sure whether my change in utils.dart is correct. I manually tested my change with an empty file, a small file (~200KB), a medium file (~5 MB), a large file (~28MB), and an x-large file (2 GB). In all cases, the upload worked. I also compared the md5 sums of each file before the upload and after having downloaded them again. It seems to work...

@xtyxtyx xtyxtyx self-requested a review January 3, 2021 13:42
@xtyxtyx xtyxtyx merged commit 2dac02e into xtyxtyx:master Jan 4, 2021
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