Upload an Image to Supabase
You should be able to replicate it I think he 's posted the project somewhere as well That link might be helpful for the API Supabase 's storage API isn 't very well documented at the moment but thankfully Erik made that video a while back I tried the follow the video of Erik for the upload from a different url , not normal select and upload from local . It wasn 't a success . Yes , the documentation isn 't the best , I have to try again . What solution do you use for you apps regarding uploading images and storing them ? Maybe is out -there something better or easy to implement . Using supabase storage for now with a bit of cloudflare R2 . Depending on the use case My upload component is vanilla though , no third -party libraries All done with toddle actions Ah actually , I think I have a simple custom action * * I have one to check file size Since I limit it Erik 's video will get you most of the way there 🙏1First request is made using regular bearer token with anon apikey The response body will have a url and a token The upload call uses that token instead and no bearer auth token since it is unproxied 🥰1Try it out to see if it works It was made for the needs of that project And I haven 't modified it to make it more 'generic ' Hi Lucas , today with the help of Erik I found the issue (uncheck Proxy ) . Now it works selecting an image from local and uploading it . I would like to improve this and process also urls (image from internet url ) . Is your package doing this ? I have no ideea from where to start doing this : ) . Glad you figured it out And no , it only handles local uploads (single or multiple ) To fetch external URLs , you 'd have to use a custom action or perhaps a third -party library might make it easier Oh okay . . . let me check mine I only have it set for storage .objects do have actual 'roles ' set up ? Both have RLS on by default iirc But I don 't need buckets to be touched , only objects I 'm still getting the RLS error . . . hmm does it take time to set in ? thanks for helping btw Hahah the AUTH header was interferring Thanks Lucas 🙂 The one I made does You have to add an attribute to the input to allow multiple And for the uploads , you have to upload each one separately My next form needs to have multiple supabase upload input It has no doc page though lol I rushed it . Extracted my component to a package and published it without anything else 😅 Ill search for it Let me know how it works If you install the package , it 'll just be the one component ❤️2🔥1










