supabase / storage

S3 compatible object storage service that stores metadata in Postgres
https://supabase.com/docs/guides/storage
Apache License 2.0
754 stars 107 forks source link

Rest Api For Storage Questions/Suggestions #441

Open dorryspears opened 6 months ago

dorryspears commented 6 months ago

Improve documentation

Link

https://supabase.github.io/storage/#

Describe the problem

*.txt

Unless it is and I am using it wrong.

Describe the improvement

Additional context

I am currently building a Rust wrapper for the Storage Product 🥳

fenos commented 6 months ago

Hi @dorryspears thanks a lot for your suggestions.

For a lot of these endpoints in the link I have above, they have "wildcard" specified. This seems ambiguous to me since this isn't a wild card in the sense that I can do something like this to grab all of the text files within an object for the GET object/authenticated endpoint *.txt

The "wildcard" parameter in the url structure is meant to match any url segment past object/{bucket}/ for instance, if you want to store a file under the following key: {bucket}/one-folder/second-folder/file.png the wildcard parameter will be one-folder/second-folder/file.png maybe the name wildcard is a bit too generic, we could probably change that.

Also, I am unsure where the user reading these docs would find the full endpoint. For example, there is the Supabase URL and the endpoints specified in the link above but there is still the storage/v1 part of the URL that the user still needs to find. Not sure where this is. I managed to find it in the source code here

It is a good point, we could probably document the endpoint more in our docs. Currently, the only place that is visible is here: https://supabase.com/docs/guides/storage/serving/downloads

The swagger docs are also unusable for executing any of the endpoints. 👍 we'll improve on that

mb21 commented 5 months ago

Relatedly, would be great to have the localhost URL documented somewhere.

What's the equivalent to https://${SUPABASE_PROJECT_ID}.supabase.co/storage/v1/upload/resumable on localhost? http://localhost:54323/storage/v1/upload/resumable gives a CORS error, so probably not the right endpoint?