Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propagate ContentType field on create/modify ops (#1141)
* Propagate ContentType field on create/modify ops This commit tries to address 2 bugs that where found when using some of the create/modify operations GCS supports like: * using the streamable upload operations of GCS to upload of a File. * update the blob metadata content-type without modifying the bytes of the blob. For the streamable upload, by default if no content-type is provided; GCS sets it up to 'application/octet-stream' or uses the one provided by the user in the BlobInfo (This is the expected behaviour for this operation in GCS). For the update, when we merge metadata information regarding the content-type, it should override it the update response should propagate this change. * Test for updateObject with content type This adds a unit test to check that when calling the updateObject method and a content type is provided, we override the previous value stored. * Update fakestorage/object_test.go --------- Co-authored-by: fsouza <108725+fsouza@users.noreply.github.com>
- Loading branch information
Showing
3 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
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
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
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