Query for people is interested: -- Enable row-level security ALTER TABLE storage.objects ENABLE ROW LEVEL SECURITY; -- Policy for SELECT operations CREATE POLICY objects_select_policy ON storage.objects FOR SELECT USING (auth.role() = 'authenticated'); -- Policy for INSERT operations WITH CHECK ! CREATE POLICY objects_insert_policy ON storage.objects FOR INSERT WITH CHECK (auth.role() = 'authenticated'); -- Policy for UPDATE operations CREATE POLICY objects_update_policy ON storage.objects FOR UPDATE USING (auth.role() = 'authenticated'); -- Policy for DELETE operations CREATE POLICY objects_delete_policy ON storage.objects FOR DELETE USING (auth.role() = 'authenticated');
@mildmildfire Жыл бұрын
you just saved me a lot of typing!
@Noritoshi-r8m Жыл бұрын
tytyty
@coleblender6 ай бұрын
I don't understand how to make this secure. The SUPABASE_URL and SUPABASE_ANON_KEY are both visible from the client. This means that someone can take those keys and create a user that they use for their own website. They can then add files to my storage and use them on their own website. How can I prevent this?
@masonnash9396 Жыл бұрын
I love your videos! You are concise yet clear. As a plus, your voice is relaxing to listen to. Keep up the great content!
@codewithguillaume Жыл бұрын
❤️ thanks my friend I really appreciate !
@malikmuhiz61732 ай бұрын
How can I perform the same action while using prisma as my ORM for supabase
@neoswann21437 ай бұрын
I get an error saying: new row violates row-level security policy. even though i set up supabase authentication, does anyone know why?
@koketsomawasha99629 ай бұрын
why does it seem like I cant loop through all items from my bucket in order to display them in my app
@quickfixportal9 ай бұрын
@codewithguillaume i have a question.We defined RLS as authenticated for also delete, is it means that a authenticated user able to delete another user profile image from storage?
@GarageDeCaca Жыл бұрын
Flutterflow can be used with supabase and it asks to enable supabase's storage in the console of supabase. How should I do that ? I don't see any of this kind of setting in my supabase's console
@jerbparagas392410 ай бұрын
Hi, can I ask if I cant use supabase storage if I am not using their auth service? I have a super customized application that implements customized authentication manually
@d13-s8b Жыл бұрын
Thanks for your videos, could be great if you make a video about different environment, production/staging! Thank again😊
@Violethood7 ай бұрын
How can I make a file/image url static. I mean if I change/replace a file it should be static url Sorry if my terminology is bad. I am new to this
@tareksellami73469 ай бұрын
You covered the upload, but how about retrieving it from the storage and displaying it
@codewithguillaume9 ай бұрын
True need to make another video really soon 😉
@DrMorax7 ай бұрын
//Hey, I saw your comment earlier and decided to send you the code I used to handle the state of my inputs after I finish working on it. //Don't forget to add your project id to the base url and add `name` attributes to your form inputs. const [product, setProduct] = useState({ title: "", description: "", category: "", quantity: 0, imageurl: "", }); const handleChange = (e: React.ChangeEvent) => { const { name, value } = e.target; setProduct((prevProduct) => ({ ...prevProduct, [name]: value })); }; const handleFileInputChange = async ( e: React.ChangeEvent ) => { const supabase = createClient(); const file = e.target.files?.[0]; if (!file) return; const { data, error } = await supabase.storage .from("products") .upload(`product_${Date.now()}`, file); if (error) { console.error(error); return; } const fullPath = (data as any)?.fullPath; console.log("Full Path:", fullPath); const baseUrl = "[insert your own supabase project id].supabase.co/storage/v1/object/public/"; const imageUrl = `${baseUrl}${fullPath}`; setProduct((prevProduct) => ({ ...prevProduct, imageurl: imageUrl })); };
@nexushare81057 ай бұрын
@@codewithguillaume i would like that. im using storages now, and i neeed to doenload the image , from buckts, not just get the url link you know, can u help me with that?
@codelucky Жыл бұрын
Can I put the entire frontend in Vercel and the complete backend part including Db in the Supabase? Is it good practice?
@codewithguillaume Жыл бұрын
Absolutely my friend a lot of projects are running like this !
@codelucky Жыл бұрын
@@codewithguillaume Thanks again. I will add Supabase integration in Vercel.
@WonderCoder7 Жыл бұрын
Hello, thanks to you for the video. But i have tried everything to enable RLS for the storage.objects but when i go to the authentication and then schema objects they seem locked instead of RLS. I couldnt find any other solution . Could you please help?
@cptankit4208 Жыл бұрын
Did you solve this sir?
@cptankit4208 Жыл бұрын
I’m also having the same problem rls is locked
@saidoubarry44557 ай бұрын
Hi everyone, i'm currently stucking from subase storage. actualy, i'm trying to upload some file into bucket from vuejs app. but i get ssage below : statusCode: '404', error: 'Bucket not found', message: 'Bucket not found'} error: "Bucket not found" message: "Bucket not found" statusCode: "404" I already added RLS for objects and buckts but nothing have been changed does anyone can help to go throug with this issue
@smashrockmediainc69328 ай бұрын
where the code for the avatar component? i like your design better than mine
@user-nh8ge6hx9r Жыл бұрын
should i use upsert to simplify the update process?
@MounirNYEF3 ай бұрын
I tried to upload a webp file in my flutterflow application to supabase storage it told me: "Invalid file format: image/webp". However when I try: - Upload the webp image in the flutterflow or supabase console it works. - Upload other formats like jpeg, png it works - Upload other webp files it doesn't work. - Display these webp images in an image editing application: it works Why?
@sinthujan-s9e3 ай бұрын
thanks
@flohh Жыл бұрын
Storage in supabase is SUPA easy
@johannschgup8532 Жыл бұрын
15 ans que je vis à l'étranger, j'ai l'impression de m'entendre quand je parle en Anglais (ce qui est le cas dans (95% des cas) :) Plus sérieusement, dans mon apprentissage perso du dev, (react, nextjs, nodejs, sql...) ce que j arrive le moins à trouver sur internet, c est de creer un CRUD de (react ou nextjs) vers un storage image (bien sur, pas en blob). J'espére que Supabase va m'aider vue que c est la même plateforme qui gére les deux (database et storage)