- <input type="file" id="upload"/><br/><br/>
- <select id="optionsName">
- </select>
- var names = [];
- $("#upload").change(function(e) {
- var name = e.target.files[0].name;
- names.push(name);
- $("#optionsName").html("<option>"+name+"</options>");
-
- });
This will add the file name selected into the Dropdown. Use .each() function in JQuery to get the List.
Hope this helps.