# Reject uploading over capacity

**URL:** <https://community.glideapps.com/t/reject-uploading-over-capacity/79544>\
**Category:** Ask for Help\
**Created:** [January 26, 2025, 6:50am UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544 "2025-01-26T06:50:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![maimo](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@maimo](https://community.glideapps.com/u/maimo)\
**Post date:** [January 26, 2025, 6:50am UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544/1 "2025-01-26T06:50:06Z")

</div>

How can we prevent users from uploading data with file sizes larger than the limit we set?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [January 26, 2025, 2:43pm UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544/2 "2025-01-26T14:43:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![maimo](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@maimo](https://community.glideapps.com/u/maimo)\
**Post date:** [January 26, 2025, 4:54pm UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544/3 "2025-01-26T16:54:09Z")

</div>

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 😴

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [January 26, 2025, 11:56pm UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544/4 "2025-01-26T23:56:16Z")

</div>

> [@maimo](#):
>
> I used Workflow’s Condition to say “I don’t like your size.” for oversize uploads and have them re-uploaded.

Yep, I think that works, but you’re still relying on the user to delete the file themselves, or is this a form?

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [January 27, 2025, 12:10am UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544/5 "2025-01-27T00:10:37Z")

</div>

Why don’t you use automatic workflow trigger if the uploaded file is too big?

---

<div class="post-metadata">

**Author:** ![maimo](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@maimo](https://community.glideapps.com/u/maimo)\
**Post date:** [January 27, 2025, 8:05am UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544/6 "2025-01-27T08:05:48Z")

</div>

In the Workflow, deleted the big file after the notification displayed.  
Yes, I have the users upload the file in the Form.

---

<div class="post-metadata">

**Author:** ![maimo](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@maimo](https://community.glideapps.com/u/maimo)\
**Post date:** [January 27, 2025, 8:16am UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544/7 "2025-01-27T08:16:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [January 27, 2025, 11:42am UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544/8 "2025-01-27T11:42:30Z")

</div>

Yes, use this use case:

> **[Real-Time Workflow Automation](https://real-time-workflow.glide.page/dl/a400f7)**
>
> This demo app is designed to showcase the core functionality of automating workflows, triggering actions based on data changes, and streamlining user interactions in real time. It highlights how you can effortlessly manage tasks and processes, making...

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.

---

<div class="post-metadata">

**Author:** ![maimo](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@maimo](https://community.glideapps.com/u/maimo)\
**Post date:** [January 28, 2025, 8:48am UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544/9 "2025-01-28T08:48:53Z")

</div>

Thanks for sharing!  
I got the notification in real time, but how do I add that data to the row?

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [January 28, 2025, 12:09pm UTC](https://community.glideapps.com/t/reject-uploading-over-capacity/79544/10 "2025-01-28T12:09:48Z")

</div>

Instead of the notification action, set a custom workflow.
