How can we prevent users from uploading data with file sizes larger than the limit we set?
At the moment there’s no native way to do this.
You might be able to use JavaScript to get an estimate of the file’s size, but then you have to configure your flow to immediately delete the file from Glide’s storage.
Sounds like something to try with AI component.
Thanks for the reply!
I used Javascript to extract the file size and replaced it with a number in the AI component, and I used Workflow’s Condition to say “I don’t like your size.” for oversize uploads and have them re-uploaded.
Waiting for the day when the capacity limitation feature is added to the File Picker options
Yep, I think that works, but you’re still relying on the user to delete the file themselves, or is this a form?
Why don’t you use automatic workflow trigger if the uploaded file is too big?
In the Workflow, deleted the big file after the notification displayed.
Yes, I have the users upload the file in the Form.
I would like not much times the user has to click the submit button, so is there any way other than Javascript to extract the file size?
Yes, use this use case:
Run a workflow on file column update, use the JS column to get the size of it. In your workflow, if size is greater than x (you could is an if then else column to get a simple true/false to use in the workflow), then delete the file and show a toast message.
Thanks for sharing!
I got the notification in real time, but how do I add that data to the row?
Instead of the notification action, set a custom workflow.