fix(性能测试): 性能测试文件上传增加大小校验

This commit is contained in:
Jianguo-Genius 2024-10-30 17:53:27 +08:00 committed by 建国
parent 521f914033
commit 6ebbd3da7a
1 changed files with 5 additions and 1 deletions

View File

@ -273,7 +273,11 @@ export default {
/// todo:
return false;
}
if (file.size / 1024 / 1024 > 50) {
this.$error(this.$t("commons.upload_limit_size"));
this.close();
return false;
}
if (this.tableData.filter(f => f.name === file.name).length > 0) {
this.$error(this.$t('load_test.delete_file') + ', name: ' + file.name);
return false;