diff --git a/openbis/source/core-plugins/dataset-uploader/1/as/webapps/dataset-uploader/html/js/DataSetFormController.js b/openbis/source/core-plugins/dataset-uploader/1/as/webapps/dataset-uploader/html/js/DataSetFormController.js index b244eb27f731f482b7fface7bf591497d5843aa2..31ee51c3d0d408e890e07914d4cfd15bcccc1093 100644 --- a/openbis/source/core-plugins/dataset-uploader/1/as/webapps/dataset-uploader/html/js/DataSetFormController.js +++ b/openbis/source/core-plugins/dataset-uploader/1/as/webapps/dataset-uploader/html/js/DataSetFormController.js @@ -42,6 +42,21 @@ function DataSetFormController() { // Form Submit // this.submit = function() { + // + // Check upload is finish + // + if(Uploader.uploadsInProgress()) { + Util.blockUI(); + Util.showError("Please wait the upload to finish.", function() { Util.unblockUI(); }); + return; + } + + if(dataSetFormModel.files.length === 0) { + Util.blockUI(); + Util.showError("You should upload at least one file.", function() { Util.unblockUI(); }); + return; + } + Util.blockUI(); var _this = this; var metadata = dataSetFormModel.dataSet.properties;