优化文件下载出现的异常(I6DLNU)

This commit is contained in:
RuoYi
2023-02-28 14:42:03 +08:00
parent e7ad4f5048
commit 612164abde
3 changed files with 15 additions and 21 deletions

View File

@@ -241,12 +241,6 @@ export function getNormalPath(p) {
}
// 验证是否为blob格式
export async function blobValidate(data) {
try {
const text = await data.text();
JSON.parse(text);
return false;
} catch (error) {
return true;
}
}
export function blobValidate(data) {
return data.type !== 'application/json'
}