11

I don't like how HTML5 multiple files selection works. First I select for example 5 files and that's OK, it shows 5 selected files. After that, I decided that I want to add 3 more files. But when I do, the "old" 5 files dissapears and only 3 new are here.

I know that it is no problem get filelist of selected files using jquery, but is there any chance how to manipulate with selected files and insert few others ?

I don't want to use solutions like you must select file one by one and another upload button is appending to document, when I see pages like that I have inclination to destruct everything what I am able to see.

Kovo
  • 434
  • 4
  • 14
  • My idea is to show list of all selected files on side or preview of images if it will be galery. Unselecting wiil not be annoying as selecting one by one. Also I want to care about cases when user select duplicates. – Kovo Mar 05 '14 at 14:55
  • This is the opposite of your question but same answer applied here: http://stackoverflow.com/questions/7099573/is-it-possible-to-remove-individual-values-from-an-file-input-multiple-element – A. Wolff Mar 05 '14 at 15:06
  • Than you for response, originally this comment is just reaction on someone others question how I will deselect file if user decide to not upload some file. But comment with this question dissapeared. – Kovo Mar 05 '14 at 15:11
  • My comment is regarding your question. Basically, you can't because FileList is readonly object – A. Wolff Mar 05 '14 at 15:13

3 Answers3

2

AS per my knowledge Its difficult to achieve through HTML. It’s better to use Ajax Form File Upload for standard type. You can refer below links:

JQuery File Uploader - https://github.com/danielm/uploader/

Multiple File Upload Plugin - http://www.fyneworks.com/jquery/multiple-file-upload/

Mini Multiple File Upload - http://demo.tutorialzine.com/2013/05/mini-ajax-file-upload-form/

jQuery File Upload - http://blueimp.github.io/jQuery-File-Upload/

Hope this helps

Patrick R
  • 6,621
  • 1
  • 24
  • 27
1

Dropzone is probably the best (very customisable, easy to setup) :

http://www.dropzonejs.com/

Has the option of multiple upload, also fallback options for old browsers. Can do batching/chunking.

goamn
  • 1,939
  • 2
  • 23
  • 39
0

i am also facing the same problem. someone has suggested me to use ajax and formdata to solve this problem as it is the default behavior of input type file to replace the old files with new selected one. u can try ajax and formdata for this problem and if it works please let me know. You can also check it here: html- input type="file" multiple

Community
  • 1
  • 1
Aisha
  • 257
  • 1
  • 8
  • 24