Quantcast
Viewing all articles
Browse latest Browse all 3527

File selection limit for an input element with type=file

Does anyone know how many files could be selected with the input type='file' element at once? My issue is that when the selected files count reaches a number, the onchange event for the input element stops firing. But I cannot tell the exact number.

my test is quite simple:

<!DOCTYPE html><html><head><meta charset="utf-8" /><title></title><script type="text/javascript" src="../jquery-2.1.1.js"></script><script type="text/javascript">
        $(document).ready(function (e) {
            $('input[type=file]').change(function (e) {
                alert("file selected");
            });
        });</script></head><body><input type="file" multiple /></body></html>

This works fine when selecting up to 100 files. But when I increase the selected count, says 1000, the onchange event stops firing. Another finding is that if I use shorter file name, I can increase the selected count. What I try is that I rename all the files with number, then I can select up to 3000 files. So what is the limitation for selecting files with input type='file' element?


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>