|
|
@@ -360,15 +360,15 @@ export default {
|
|
|
// ****************************************************************************************************************
|
|
|
onFileAdded(file) {
|
|
|
if (file.file.size > 1024 * 1024 * 1024 * 20) {
|
|
|
- file.cancel()
|
|
|
- this.$notify({
|
|
|
- title: '提示',
|
|
|
- message: '文件应小于 20GB',
|
|
|
- type: 'warning',
|
|
|
- duration: 3000
|
|
|
- })
|
|
|
+ this.$message.warning('上传的文件应小于 20GB')
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ if (this.uploadForm.pid === null) {
|
|
|
+ this.$message.warning('请先选择文件目录')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
file.pause()
|
|
|
hashFile(file.file).then(result => {
|
|
|
this.startUpload(result.sha256sum, file)
|