1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 18:35:09 +01:00

fix additional files button bug

This commit is contained in:
Tim Daubenschütz 2015-08-24 14:16:13 +02:00
parent f54d7bb85c
commit 18634ffe50
2 changed files with 5 additions and 4 deletions

View File

@ -709,8 +709,10 @@ var ReactS3FineUploader = React.createClass({
// if we're not hashing the files locally, we're just going to hand them over to fineuploader // if we're not hashing the files locally, we're just going to hand them over to fineuploader
// to upload them to the server // to upload them to the server
} else { } else {
this.state.uploader.addFiles(files); if(files.length > 0) {
this.synchronizeFileLists(files); this.state.uploader.addFiles(files);
this.synchronizeFileLists(files);
}
} }
}, },

View File

@ -61,10 +61,9 @@ let CylandAdditionalDataForm = React.createClass({
}, },
isReadyForFormSubmission(files) { isReadyForFormSubmission(files) {
let uploadedFiles = files.filter((file) => file.status === 'upload successful');
let uploadingFiles = files.filter((file) => file.status === 'submitting'); let uploadingFiles = files.filter((file) => file.status === 'submitting');
if (uploadedFiles.length > 0 && uploadingFiles.length === 0) { if (uploadingFiles.length === 0) {
return true; return true;
} else { } else {
return false; return false;