File uploader for multiple files with a progress bar.
It uses the offthread-image element to render the thumbnails so it performs awesome on slow devices like mobile phones.
<file-uploader id="fileUploader"><file-uploader>
...
const xhrParamsPromise = new Promise((resolve, reject) => {
...
resolve({url, method, headers});
});
this.$.fileUploader.addFile(file, xhrParamsPromise);
Why xhrParams as a promise? This is handy on enviroments like S3 when you have to ask for signed urls before uploading the files. This way that request is also part of the file uploading progress.
Any browser that supports Polymer 2.0-preview