fake-gcs-server
fake-gcs-server copied to clipboard
404 when uploading to empty storage
When I start with a new empty instance and try to upload to it, it throws 404 error.
If I initialise it with some data, it works.
time="2021-12-15T09:33:35Z" level=info msg="couldn't load any objects or buckets from \"/data\", starting empty"
time="2021-12-15T09:33:35Z" level=info msg="server started at http://localhost:8080"
time="2021-12-15T09:34:41Z" level=info msg="172.19.0.1 - - [15/Dec/2021:09:34:41 +0000] \"POST /upload/storage/v1/b/test_bucket/o?uploadType=multipart&name=a814275b4b9d61c850bfa612382821374c34b2c8 HTTP/1.1\" 404 59"
@bkondakor you may need to create the bucket before uploading to it. Can you share the code that you used to try to upload the file? Thanks!
we're seeing the same issue. even with buckets created in the /data
directory this call always fails:
time="2022-01-31T20:16:28Z" level=info msg="172.17.0.1 - - [31/Jan/2022:20:16:28 +0000] \"POST /upload/storage/v1/b/bucketname/o?uploadType=multipart&name=foo.json HTTP/1.1\" 404 59"
this is with @google-cloud/[email protected]
btw the solution we found was to add an empty file in the (empty) bucket directory. now we can reliably start a server and have all of our buckets exist .
@modosc can you provide a reproducer?