There are a number of ways to achieve multiple file upload functionality, but I like HTML5 way of doing it, and it will be supported across all major browsers when IE10 ships. Also, Twitters’ Bootstrap helped me achieve the look without problems. I used a bit of jQuery for help with events. Alongside vanilla html, I will put Twig form syntax to achieve this, together with Symfony2 Form component, for server side.
Demo: Pretty File Boilerplate
[prism key=”code-html” language=”markup”]
You can add
accept attributes as needed.
[prism key=”code-css” language=”css”]
[prism key=”code-twig” language=”markup”]
[prism key=”code-php” language=”php”]
I have used Silex / Symfony here, but anything will do.
- HTML5 XHR drag and drop upload
- cross-browser testing