# Setting the max file upload count outside of the html field

**URL:** <https://community.transloadit.com/t/setting-the-max-file-upload-count-outside-of-the-html-field/18263>\
**Category:** Transloadit\
**Tags:** tender-archive\
**Created:** [February 25, 2014, 8:55am UTC](https://community.transloadit.com/t/setting-the-max-file-upload-count-outside-of-the-html-field/18263 "2014-02-25T08:55:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattgen](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mattgen](https://community.transloadit.com/u/mattgen)\
**Post date:** [February 25, 2014, 8:55am UTC](https://community.transloadit.com/t/setting-the-max-file-upload-count-outside-of-the-html-field/18263/1 "2014-02-25T08:55:00Z")

</div>

> Archived from the Transloadit support forum. Originally posted on February 25, 2014; details may be outdated, see [our docs](https://transloadit.com/docs/) for current behavior. [Original thread](https://web.archive.org/web/20150423071252/http://support.transloadit.com/discussions/questions/8661-setting-the-max-file-upload-count-outside-of-the-html-field)

Hi

I’ve found the html5 min/max file count via the file input field to not work so great.

Is it possible to ignore all but the fix X files (a max count setting)?

Also - the max upload, is that all the files combined and is it measured in K?

Thanks,  
Matt

---

<div class="post-metadata">

**Author:** ![tim-kos](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tim-kos](https://community.transloadit.com/u/tim-kos)\
**Post date:** [February 26, 2014, 7:36am UTC](https://community.transloadit.com/t/setting-the-max-file-upload-count-outside-of-the-html-field/18263/2 "2014-02-26T07:36:00Z")

</div>

Hey Matt,

> I’ve found the html5 min/max file count via the file input field to not work so great.

Not sure I understand. Do you mean the file input field attributes for this?

> Is it possible to ignore all but the fix X files (a max count setting)?

Did you mean “first” instead of “fix”?

I think it’s possible by inspecting the value attribute of your file input field and see how many files were selected. If that is bigger than a certain X, you could display a warning message and block form submission. If this does not work, then you could most likely you the html5 file reader API.

> Also - the max upload, is that all the files combined and is it measured in K?

You probably mean the “max\_size” parameter. Yes, that is the size of all uploads combined.

I hope this helps.

Kind regards,  
Tim

Co-Founder Transloadit  
@tim\_kos

---

<div class="post-metadata">

**Author:** ![mattgen](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mattgen](https://community.transloadit.com/u/mattgen)\
**Post date:** [February 26, 2014, 9:25am UTC](https://community.transloadit.com/t/setting-the-max-file-upload-count-outside-of-the-html-field/18263/3 "2014-02-26T09:25:00Z")

</div>

RE: Not sure I understand. Do you mean the file input field attributes for this?  
Yeah, I meant (not that it worked)

I’ve found some jquery methods ([http://stackoverflow.com/questions/10105411/how-to-limit-maximum-items-on-a-multiple-input-input-type-file-multiple](http://stackoverflow.com/questions/10105411/how-to-limit-maximum-items-on-a-multiple-input-input-type-file-multiple)).

But, it would be annoying for people to have to re-select.

What I wanted to do was above the uploader say:  
“If you select multiple files - only the first 5 files under 4MB will be uploaded.”

> then the system can let them select all if they do by mistake, and when the files upload it will only take the first 5 under 4MB and ignore the rest …

Is this possible?

Thanks,  
Matt

---

<div class="post-metadata">

**Author:** ![tim-kos](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tim-kos](https://community.transloadit.com/u/tim-kos)\
**Post date:** [February 27, 2014, 7:14am UTC](https://community.transloadit.com/t/setting-the-max-file-upload-count-outside-of-the-html-field/18263/4 "2014-02-27T07:14:00Z")

</div>

Hey Matt,

okay got it. Yeah a simple notification at the top should suffice I think. If people ignore it, then they should not be annoyed when they have to reselect.

> Is this possible?

Yeah it’s possible, but only with the File Reader API. And you will need my XHR implementation for that. [https://github.com/tim-kos/transloadit\_xhr](https://github.com/tim-kos/transloadit%5Fxhr)

Kind regards,  
Tim

Co-Founder Transloadit  
@tim\_kos

---

<div class="post-metadata">

**Author:** ![mattgen](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mattgen](https://community.transloadit.com/u/mattgen)\
**Post date:** [February 28, 2014, 2:15am UTC](https://community.transloadit.com/t/setting-the-max-file-upload-count-outside-of-the-html-field/18263/5 "2014-02-28T02:15:00Z")

</div>

Hi Tim

Thanks for the info. I suppose I just wanted it as an attribute in the standard implementation …

Matt

---

<div class="post-metadata">

**Author:** ![tim-kos](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tim-kos](https://community.transloadit.com/u/tim-kos)\
**Post date:** [February 28, 2014, 6:51am UTC](https://community.transloadit.com/t/setting-the-max-file-upload-count-outside-of-the-html-field/18263/6 "2014-02-28T06:51:00Z")

</div>

I see. I am adding this to our TODO list for a future release.

I am going to close the ticket for now. Please let me know in case you have more questions.

Kind regards,  
Tim

Co-Founder Transloadit  
@tim\_kos

---

<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, 10:46am UTC](https://community.transloadit.com/t/setting-the-max-file-upload-count-outside-of-the-html-field/18263/7 "2026-10-07T10:46:03Z")

</div>

Closed on October 7, 2026, 10:46am UTC


