mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-26 06:05:54 +03:00
[PR #2114] [MERGED] fix: Preserve content type from resumable upload session metadata #2108
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#2108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fsouza/fake-gcs-server/pull/2114
Author: @ide
Created: 1/21/2026
Status: ✅ Merged
Merged: 1/31/2026
Merged by: @fsouza
Base:
main← Head:fix-resumable-upload-content-type📝 Commits (1)
57e71b1Preserve content type from resumable upload session metadata📊 Changes
2 files changed (+199 additions, -1 deletions)
View changed files
📝
fakestorage/upload.go(+1 -1)📝
fakestorage/upload_test.go(+198 -0)📄 Description
Why
When uploading files using resumable uploads, the
contentTypespecified in the initial session creation request was being overwritten withapplication/octet-streamwhen uploading file content.Before: session metadata sets
contentType: "text/csv"→ chunk upload without Content-Type header → object hascontentType: "application/octet-stream"After: session metadata sets
contentType: "text/csv"→ chunk upload without Content-Type header → object hascontentType: "text/csv"How
Only default to
application/octet-streamwhen no content type was set in either the chunk upload's Content-Type header or the session initialization metadata.Test Plan
go test ./fakestorage/... -run TestResumableUploadContentType🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.