Skip to content
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

Unable to upload file to bucket: getting 404 #1753

Open
mswami1 opened this issue Sep 23, 2024 · 2 comments
Open

Unable to upload file to bucket: getting 404 #1753

mswami1 opened this issue Sep 23, 2024 · 2 comments

Comments

@mswami1
Copy link

mswami1 commented Sep 23, 2024

Error:

Writer.Close: googleapi: Error 404: Not Found, Not Found

docker service:

storage:
image: fsouza/fake-gcs-server
environment:
STORAGE_EMULATOR_HOST: localhost:4443
ports:
- '4443:4443'
command: -scheme http -port 4443 -public-host localhost:4443
volumes:
- .:/gcs_storage

client, err1 := storage.NewClient(context.TODO(), option.WithEndpoint("http://127.0.0.1:4443/storage/v1/"))

@KeithScheiwiller
Copy link

Did you create a directory within /storage with the matching bucket name? I faced the same issue but doing so solved it. I didn't see it mentioned in the docs, but it seems it does not auto-create buckets.

@fsouza
Copy link
Owner

fsouza commented Jan 3, 2025

Yeah upload will fail if the bucket doesn't exist. I'll keep this open to improve the error message or at least log that the bucket doesn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants