question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

maxNumberOfFiles seems to limit the total number of files that can be selected

See original GitHub issue

When I set maxNumberOfFiles: 1 and select a file via the FileInput plugin, in version 0.24.2 I was able to select another file after that (in a new dialog). However, when I upgraded to 0.24.4 the Informer plugin tells me that I cannot select more than 1 file.

Is this the intended behaviour? The maxNumberOfFiles option is described as “the number of files user is able to select via the system file dialog in UI plugins like DragDrop, FileInput and Dashboard”. Does this mean “at once” or “in total”?

It would be great if there was a way to make the <input type="file"> from FileInput input plugin accept only 1 file (i.e. multiple is not specified), but allow re-selecting it. In my application the newly uploaded file would replace the previous file.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jrochkindcommented, Feb 8, 2019

This is a problem for me too, with FileInput plugin. I only want one file at a time, but after choosing one file, I want user to be able to change their mind and choose a different one.

I can handle all that logic myself in JS – I just want to be able to have FileInput launch an OS file modal that only allows selection of one file; but later be able to do that a second and subsequent times on the same page.

0reactions
randallmloughcommented, Jun 9, 2019

posted a workaround in #1575 that’s been working well for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to limit the maximum files chosen when using multiple file ...
You could run some jQuery client-side validation to check: $(function(){ $("input[type='submit']").click(function(){ var $fileUpload ...
Read more >
How to restrict the number of files for a single upload - Telerik
Hi, I want to restrict the number of files that can be uploaded to the server for a single Upload click to a...
Read more >
Max files per directory on NTFS vol vs FAT32 - Super User
"Maximum number of files in a single folder: 65,534 (FAT32)" - This limit would seem to be dependent on the length of the...
Read more >
how to check if I have some limit on max number of files inside ...
It depends on your filesystem. Ext3 has the following limits: Maximum number of sub-directories: 32000 (hardcoded); Maximum number of inodes ...
Read more >
const - Uppy
maxFileSize null | number — maximum file size in bytes for each individual file ... null | number — total number of files...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found