You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that, when using local development with supabase start, supabase.storage.from().getPublicUrl() doesn't seem to return a valid URL. However, .download() works fine.
To Reproduce
Start Supabase locally with supabase start
Upload an image with supabase.storage.from("test").upload(path, file) (I guess you don't need to initialize buckets locally? There's nothing in the web interface)
Try supabase.storage.from("test").download(path) -- you'll get valid data
Try supabase.storage.from("test").getPublicUrl(path) -- you'll get a URL like http://localhost:54321/storage/v1/object/public/test/0.33763726009346384.jpg but that returns a 404 with {"statusCode":"404","error":"Not found","message":"The resource was not found"}
Expected behavior
I would expect the URL from getPublicURL() to return a 200 with the image.
Screenshots
n/a
System information
OS: macOS 12.2
Browser: Chrome latest
Version of supabase-js: 0.18.1
Version of Node.js: v16.13.0
The text was updated successfully, but these errors were encountered:
Hmm I do see that the upload code doenst check if the bucket exists first, will create an issue for this. If you create a bucket first and set the bucket to public, getPublicURL should then work. Buckets are private by default (and in this weird case where the bucket doesn't actually exist, the code assumes its a private bucket)
Bug report
Describe the bug
It appears that, when using local development with
supabase start
,supabase.storage.from().getPublicUrl()
doesn't seem to return a valid URL. However,.download()
works fine.To Reproduce
supabase start
supabase.storage.from("test").upload(path, file)
(I guess you don't need to initialize buckets locally? There's nothing in the web interface)supabase.storage.from("test").download(path)
-- you'll get valid datasupabase.storage.from("test").getPublicUrl(path)
-- you'll get a URL likehttp://localhost:54321/storage/v1/object/public/test/0.33763726009346384.jpg
but that returns a 404 with{"statusCode":"404","error":"Not found","message":"The resource was not found"}
Expected behavior
I would expect the URL from
getPublicURL()
to return a 200 with the image.Screenshots
n/a
System information
The text was updated successfully, but these errors were encountered: