diff --git a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue index facd8f3e3..e154152b3 100644 --- a/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue +++ b/web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue @@ -194,6 +194,11 @@ export default { const filesSize = fileList.reduce((acc, item, index) => acc + item.size, 0) + (file ? file.size : 0); const filesCount = fileList.length + (file ? 1 : 0); const allfilesSize = filesSize + this.state.size; + if (file && filesCount > maxFileSize) { + this.dropzoneHandler.removeFile(file); + this.showUploadErrInfo(true, this.getDefaultErrTxt()); + return false; + } if (filesCount > maxFileSize || allfilesSize > maxModelFilesSize) { this.showUploadErrInfo(true, this.getDefaultErrTxt()); return false;