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 storage admin sdk content type #5229
Fix storage admin sdk content type #5229
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two small comments, overall lgtm thanks for the fix!
@@ -251,6 +251,26 @@ describe("GCS endpoint conformance tests", () => { | |||
expect(returnedMetadata.contentType).to.equal(customMetadata.contentType); | |||
expect(returnedMetadata.contentDisposition).to.equal(customMetadata.contentDisposition); | |||
}); | |||
|
|||
it("should upload content type properly from x-upload-content-type headers", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a test for the media upload protocol above as well?
src/emulator/storage/upload.ts
Outdated
@@ -44,7 +44,7 @@ export type MediaUploadRequest = { | |||
export type MultipartUploadRequest = { | |||
bucketId: string; | |||
objectId: string; | |||
metadataRaw: string; | |||
metadataRaw: object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit: can you rename this metadata
if we're passing in the object
Codecov ReportBase: 56.27% // Head: 56.27% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5229 +/- ##
=======================================
Coverage 56.27% 56.27%
=======================================
Files 309 309
Lines 20813 20815 +2
Branches 4223 4223
=======================================
+ Hits 11712 11714 +2
- Misses 8088 8089 +1
+ Partials 1013 1012 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Description
Fixes the content type admin sdk issues mentioned here #4982
Scenarios Tested
Tested via nodejs admin sdk and python gcs sdk. Also added new tests for this specific issue