Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Advanced feature + script #23

Open
bgougent opened this issue Dec 27, 2014 · 0 comments
Open

Advanced feature + script #23

bgougent opened this issue Dec 27, 2014 · 0 comments

Comments

@bgougent
Copy link

See also http://www.raymondcamden.com/2013/09/10/Adding-a-file-display-list-to-a-multifile-upload-HTML-control

This will add a list before uploading the files.

<input type="file" id="files" name="files[]" multiple="" size="20" />
<br /><br /><div id="selectedFiles"></div><br />
<input type="submit" value="upload" />
<script> var selDiv = ""; document.addEventListener("DOMContentLoaded", init, false); function init() { document.querySelector('#files').addEventListener('change', handleFileSelect, false); selDiv = document.querySelector("#selectedFiles"); } function handleFileSelect(e) { if(!e.target.files) return; selDiv.innerHTML = ""; var files = e.target.files; for(var i=0; i"; } } </script>
@bgougent bgougent changed the title Advanced feature Advanced feature + script Dec 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant