Can someone give me an efficient way to limit the ...
# help
b
Can someone give me an efficient way to limit the sum total size of files a user can upload? Like a single user can only upload upto 50MB
n
Hello @BallisticSwami! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
🆕 Limiting Total Uploads
f
u can check the file size at the browser side before upload it
n
Limiting Total Uploads
b
No i dont want to limit a single file. The user can upload any number of files, but the total space taken should not exceed 50MB
f
gotcha
b
I want to do this on the backend side, if I can. Otherwise I have a way to do it on the browser side
f
so u have a custom endpoint to process the upload, right?
b
Just using supabase's provided upload function. Wanted to know if I can use row level security to do something like this
b
Thanks looking into it
f
I think you could use a policy that runs a function to check if the user has bandwidth to upload files