mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-26 14:15:49 +03:00
[PR #530] [MERGED] Add file download to node example #690
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#690
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/530
Author: @aeaton-overleaf
Created: 7/12/2021
Status: ✅ Merged
Merged: 7/13/2021
Merged by: @fsouza
Base:
main← Head:node-file-download📝 Commits (6)
665e435Add file download to node example0d54e5bSet validation: false5160cd8Set X-Goog-Hash header on download response1bf4d77Add both crc32c and md51d79271Remove fixed comment.d5dab68Don't set empty content-type header on download📊 Changes
4 files changed (+23 additions, -3 deletions)
View changed files
➕
examples/node/docker-compose.yaml(+9 -0)📝
examples/node/index.js(+9 -2)📝
examples/node/package.json(+1 -0)📝
fakestorage/object.go(+4 -1)📄 Description
docker-compose.yamlto start thefake-gcsservice (copied from thedotnetexample, with the addition of abuildpath and avolumesmount to load the example data).The
downloadexample is currently failing when used with@google-cloud/storage> v5.8.1 unlessvalidation: falseis set, which isn't ideal - it seems thatfake-gcsneeds to be setting ax-goog-hashheader on the response.I've added a line of code that sets
X-Goog-Hashon the download response, but I'm not sure when either ofobj.Crc32corobj.Md5Hashare guaranteed to be set on the object, so someone with more knowledge of the server will need to finish this off.Closes #529.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.