remember that you have loops in workflows and you can mix and match them with javascript actions.
If it works for a single file use the code in a js action inside a loop in the workflow
@visualdevs This thread ended awkwardly I think⦠Was there some final Javascript code you needed up using to handle multiple files nicely?
The Supabase documention mentions not going over 6MB for the standard upload method
Thereās some Resumable upload feature for larger files, which one does your method use? (Seems the simple upload method)
@Joyce Is there anything on the roadmap to add Supabase Storage natively in the plugin? To upload and retrieve/download files. Thanks!
Welcome to the community
to handle multiple files you need a loop, which you can create in the workflow. In the loop you can use the code to make the direct upload.
You can do it all in one javascript action but you need to handle correctly the async loop. If you go with the gpt path you can use the new copilot feature, ask Joyce how to get access.
Supabase announced the new resumable upload for large files yesterday, itās in beta and not everybody has access to it right now.
Yes! Itās on our radar, currently under review but not yet prioritized
Blockquote
remember that you have loops in workflows and you can mix and match them with javascript actions.
If it works for a single file use the code in a js action inside a loop in the workflow
Thanks for this reminder. I really like how the JS stays very compartmentalized and the workflow loops make it more visual as to whatās happening.
Question. If a bad agent has a user account, wouldnāt they be able to see their authentication token as this is a front-end call, and just spam the userās supabase storage?
It doesnāt work for HTTPS requests to Storage, if you see the Limitations section at the bottom of the article. But definitely a good idea for general requests to the db
Any updates on this?? Currently using google storage and supabase everything else.
Yesssss. File storage plugins, including Supabase storage, are still under review (so canāt provide an ETA) but they are gaining ground in the roadmap
Why not use a call to generate a signed upload URL for supabase? You make an authenticated call to get the URL, then use this URL for the upload. Supabase Javascript Client - Create signed upload URL
Do you can show how to code that request? Because only with the following code itās not possible to get the signed URL from Supabase. Would be great, if you can show the workflow.
so important! Are there any updates, when you have some good news for us?
wwLib.wwPlugins.supabaseAuth.publicInstance
should have your supabase
instance, so you can try await wwLib.wwPlugins.supabaseAuth.publicInstance.storage.from(...)
(see here)
thx a lot for your replay! @dorilama
im struggling with this message now⦠What iāam doing wrong?
the error is very clear: await
can be used only in async functions
async function run(){
await yourLogic()
}
Because the url is not created in a sync way you donāt want to do this in the code for the image source.
Itās better that you do this in a workflow with a javascript action. In weweb javascript actions are wrapped inside async functions, so you can use the code directly. Add return data
at the end so itās available in the next action and assign the value to a weweb variable.
Hey @dorilama thx! The way to do this in a workflow worked very well! I got the presigned URL with expire token etc. You will see the rest in the screenshots (For other ones who need some inspirations )

My next question is how to get this code running without a workflow? I have a collection and every ārowā should do this request of an unique image/signedURL. Can you show me how to do this? I searched a lot but got not helpful information
My Collection:
Code:
const { data, error } = await wwLib.wwPlugins.supabaseAuth.publicInstance
.storage
.from('images')
.createSignedUrl('test_image.png', 60);
return data
Thank you very much!!
you can use a for loop in the workflow and save the result in a object or an array.
Is that the common way to retrieve presigned urls from supabase storage? Because there are many posts here in the weweb community which struggle with uploading files to supabase. But nobody asked how to show the data/files
I could also do the buckets of supabase as public, but then everybody with that link can see the sensitive data.
Well, from your experience it looks like the binding for the image src is a sync function. You need to retrieve the url with an async function, therefore you canāt use the code directly in the binding because a promise is not a string. The next step is using workflow + variable. When you try that and discover something specific that you donāt like then you can decide if itās the case to invest time and effort to find a different solution.
You may want to start another topic about this, it will make easier to search for it in the future by other users.