mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[GH-ISSUE #296] Issue with the filesystem backend #59
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#59
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?
Originally created by @bkhanale on GitHub (Jul 27, 2020).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/296
I'm trying to upload files to a local filesystem. As I upload they get saved to the root dir and once I'm done with the server, I close it and start again when needed. Unfortunately when I restart server all of the
/download/...links don't return the data correctly. For example when I upload a.mp3file withContent-Type: audio/mpegand tried to download it through the endpoint I just get a plain text output without anyContent-Typeset (after server restart).I tried to look over the code and I realise that it's not able to set any content type here. I tried to do it manually to test and even though I don't get plain text anymore the file content itself does not look correct (the browser doesn't get to play the file). I wasn't able to figure out the reason behind this issue.
Let me know if you need some more data to replicate or work with this issue.
@fsouza commented on GitHub (Jul 27, 2020):
Hey, thanks for reporting this issue.
If you save the file locally is the content correct? Like can you play the mp3 file if you curl it?
Do you have a simple reproducer? I can check this out later today.
Does it work if you use the memory backend?
@bkhanale commented on GitHub (Jul 28, 2020):
I can't, it just saves the whole thing as a json. Like this here. I don't know if it is supposed to be saved that way. The filename is correct though.
Yeah, so I'm uploading the file like this:
This uploads the file fine, I can see the file in my media dir. On requesting to download the file through
/download/...endpoint I do get the file downloaded properly. But if I restart the server and access the same link again, I just get a plain text response instead of the file itself.Yes, it does I guess hoping that it is used when the server is not restarted. Correct me if I'm wrong. @fsouza
@fsouza commented on GitHub (Jul 28, 2020):
@bkhanale gotcha, I think the filesystem backend doesn't persist metadata currently, we need to implement that :(
@fsouza commented on GitHub (Feb 15, 2021):
(I think this maybe due to how we store the actual file content. Need to revisit, maybe use base64 for bytes, idk)