# Jquery Plugin - Stop upload if size too large

**URL:** <https://community.transloadit.com/t/jquery-plugin-stop-upload-if-size-too-large/17975>\
**Category:** Transloadit\
**Tags:** tender-archive\
**Created:** [September 7, 2011, 8:23pm UTC](https://community.transloadit.com/t/jquery-plugin-stop-upload-if-size-too-large/17975 "2011-09-07T20:23:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmyers](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/tmyers/32/1532_2.png) [@tmyers](https://community.transloadit.com/u/tmyers)\
**Post date:** [September 7, 2011, 8:23pm UTC](https://community.transloadit.com/t/jquery-plugin-stop-upload-if-size-too-large/17975/1 "2011-09-07T20:23:00Z")

</div>

> Archived from the Transloadit support forum. Originally posted on September 7, 2011; details may be outdated, see [our docs](https://transloadit.com/docs/) for current behavior. [Original thread](https://web.archive.org/web/20140731201740/http://support.transloadit.com/discussions/questions/233-jquery-plugin-stop-upload-if-size-too-large)

I’m trying to limit the size of the upload. This is a very rough version, but please let me know how I can better it.

Example for files under 10 megs

```auto
onProgress: function(bytesReceived, bytesExpected) {
            if(parseInt(bytesExpected) > 10500)
            {
                $('#progress').fadeOut();
                $('#MyForm').transloadit('cancel');
                $('#MyForm').transloadit('stop');
                alert('This upload exceeds the size limit');
            }
    
         }

```

---

<div class="post-metadata">

**Author:** ![Felix\_Geisendorfer](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/felix_geisendorfer/32/1463_2.png) [@Felix\_Geisendorfer](https://community.transloadit.com/u/Felix_Geisendorfer)\
**Post date:** [September 8, 2011, 4:44pm UTC](https://community.transloadit.com/t/jquery-plugin-stop-upload-if-size-too-large/17975/2 "2011-09-08T16:44:00Z")

</div>

Hi,

we have a ‘max\_size’ parameter you can use:

[http://transloadit.com/docs/authentication#more-authentication-options](http://transloadit.com/docs/authentication#more-authentication-options)

Let me know if that works,  
--fg

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/transloadit/original/1X/04ee57da0cb7ac8728a9ac5965c288164f4ce280.svg) [@system](https://community.transloadit.com/u/system)\
**Post date:** [October 7, 2026, 9:37am UTC](https://community.transloadit.com/t/jquery-plugin-stop-upload-if-size-too-large/17975/3 "2026-10-07T09:37:06Z")

</div>

Closed on October 7, 2026, 9:37am UTC


