Implemented multi-file upload/download

This commit is contained in:
Danny Coates 2018-07-25 22:26:11 -07:00
parent b2aed06328
commit 7bf104960e
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
18 changed files with 475 additions and 183 deletions

View file

@ -1,5 +1,6 @@
/* global MAXFILESIZE */
const { bytes } = require('./utils');
import Archive from './archive';
import { bytes } from './utils';
export default function(state, emitter) {
emitter.on('DOMContentLoaded', () => {
@ -18,11 +19,8 @@ export default function(state, emitter) {
if (target.files.length === 0) {
return;
}
if (target.files.length > 1) {
// eslint-disable-next-line no-alert
return alert(state.translate('uploadPageMultipleFilesAlert'));
}
const file = target.files[0];
const file = new Archive(target.files);
if (file.size === 0) {
return;
}