Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have the code to do a multiple upload, but I can not find any example where it shows me how to add multiple files and then before upload add more files. It clears out the current files in the file upload every time I click it and does not keep the files.

I know that this is how it is supposed to work but is there any work around ?

What I have tried:

I have not tried anything since I can't find any examples

My tag for the multiple file upload
<asp:FileUpload ID="FileUpload1"  AllowMultiple="true" runat="server" Font-Names="Verdana" Visible="True" Width="265px" Font-Size="X-Small" Height="23px" onchange="javascript:updateList()" />


My code to load the files in a list
<pre> updateList = function () {
var input = document.getElementById('ctl00_ContentPlaceHolder1_FileUpload1');
var output = document.getElementById('fileList');
var FileList = document.getElementById('SelectedFilesHeader');

FileList.style.display = "Block";
output.innerHTML = '<ul ID="ctl00_ContentPlaceHolder1_ulInputFiles">';
 for (var i = 0; i < input.files.length; ++i) {
      output.innerHTML += '<li ID="liInputFiles_' + i +'">' + input.files.item(i).name + '<input type="button" Value="X" ID="btnInputFiles_' + i +'" /></li > ';
}
output.innerHTML += '</ul>'; }
Posted
Comments
Faaiz Shabbir 24-May-18 6:45am    
try Kendo Uploader.
here's the link. https://demos.telerik.com/kendo-ui/upload/index

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900