-
Notifications
You must be signed in to change notification settings - Fork 902
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
Set custom metadata correctly for resumable uploads #4278
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
synced offline, do you mind rebasing off of #4262 and pulling the |
tonyjhuang
reviewed
Mar 9, 2022
tonyjhuang
reviewed
Mar 10, 2022
tonyjhuang
reviewed
Mar 15, 2022
abhis3
force-pushed
the
abhisunDev
branch
2 times, most recently
from
March 15, 2022 22:41
dc62cac
to
74a3e70
Compare
abhis3
commented
Mar 15, 2022
tonyjhuang
reviewed
Mar 16, 2022
tonyjhuang
reviewed
Mar 18, 2022
tonyjhuang
reviewed
Mar 18, 2022
tonyjhuang
approved these changes
Mar 24, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes a bug where resumable uploads were not honoring and setting user provided metadata on file upload.
multipart
path in the code, hence why this case wasn't covered.Fixes a bug where certain metadata fields weren't present in
CloudStorageObjectMetadata
, making them revert to a default value and hence returning incorrect metadata on the finalPUT
requests.Fixes a bug where GCS metadataUpdate cloud functions were triggered in incorrect situations
Part of fixes to #3398
Scenarios Tested
Tested functionality on a sample iOS app, code here: https://github.com/abhis3/Storage-Emulator-Issue/blob/main/Storage%20Emulator%20Issue/StorageManager.swift
Testing against prod, we see the expected behavior so it's definitely an emulator issue.
Prior to the change, we see that the set metadata looked something like this (using the above app):
After the changes, metadata looks similar to:
Note the changes in the
contentDisposition
andcontentType
fields.