Does anyone know if there is a good way to test st...
# help
k
Does anyone know if there is a good way to test storage implementation locally? Currently to test that everything is working proper I have to use a separate hosted project to make sure the files are being uploaded correctly. I know its in a beta but just curious. I run everything else out of the docker container.
b
k
Thanks @User I will take a look at this!
I read through the post and tried running down some of the details to use the new system based file storage for local and updated the CLI but Its a little confusing. I am assuming eventually some better documentation will be added
b
I haven't tried this myself yet (it was just released last week) but when I do, I'll see what I can do about getting the docs updated.
In the meantime, the guy to reach out to is @User -- he's the Supabase Storage Hero. 🏅
k
Awesome thanks @User and if @User chimes in I would be more then happy to set this up locally and help provide feedback.
b
It's pretty cool to see how awesome this storage implementation is. Having it tied to records in PostgreSQL with the same security (RLS) implementation, and now with local dev options -- it's come together really fast. It's really well designed, IMHO.
k
Yeah I agree! On my current project I had been putting off doing image uploads. It's a Jamstack app. Using the currrent storage implementation I was able to get image uploads working in few hours. That was my only complaint was I would have to stop using my local env variables and start use a hosted database instance to see if it was working as expected and if I was handling errors properly. The dev experience has been improving at an insanely fast rate!
e
Hey Kris, yup the local setup should have storage now. You have two options for storing the objects - s3 and for that you will need to add in the config variables for the s3 bucket here and set the storage backend to s3 https://github.com/supabase/supabase/blob/c142ea71e7a21603d056d99a314579d2fe4f47b6/docker/docker-compose.yml#L99-L101
and you can also use a local file system as the place to store objects by setting the storage_backend as file and setting the path to the file system here - https://github.com/supabase/supabase/blob/c142ea71e7a21603d056d99a314579d2fe4f47b6/docker/docker-compose.yml#L103
k
Thanks for the response @User
Maybe thats why it wasn't straight forward I pulled latest CLI and ran init again but docke-compose doesn't have the storage config
hmm no wonder I was on 0.3.6 when I ran upgrade it only went to 0.3.9 but the newest is at 0.5.0
e
oh i think a few more changes are not in the latest release..pushing out a new version in a bit cc @User
k
Awesome thanks guys I will check it out in a bit when next version drops
s
Newest version should have it now @User
2 Views