Commit f44d0929 authored by 田翔's avatar 田翔

fix: 其他附件形式会显示缩略图bug修复

parent 19bf3e21
{
"name": "panda-xform",
"version": "5.3.1",
"description": "5.3.1 接口中统一添加Civ-Site",
"version": "5.3.2",
"description": "5.3.2 其他附件形式会显示缩略图bug修复",
"keywords": [
"panda-xform"
],
......
......@@ -250,11 +250,14 @@ const FileUpload = (props) => {
status: 'done',
url: list[i]?.includes('http') ? list[i] : `${window.origin}${downloadFileUrl}?filePath=${list[i]}${site ? `&_site=${site}` : ''}`,
sourcePath: list[i],
thumbUrl: list[i]?.includes('http') ? list[i] : (list[i].includes('svg') ? await convertUrlToBase64(`${window.origin}${downloadFileUrl}?filePath=${list[i]}${site ? `&_site=${site}` : ''}`) : `${window.origin}${downloadFileUrl}?filePath=${list[i]}${site ? `&_site=${site}` : ''}`),
// thumbUrl: list[i]?.includes('http') ? list[i] : (list[i].includes('svg') ? await convertUrlToBase64(`${window.origin}${downloadFileUrl}?filePath=${list[i]}${site ? `&_site=${site}` : ''}`) : `${window.origin}${downloadFileUrl}?filePath=${list[i]}${site ? `&_site=${site}` : ''}`),
originFileObj: { "uid": uid },
"response": { "code": 0, "msg": "Ok", "data": list[i], "stackTrace": null },
"xhr": {},
};
if (fileType === '图片') {
_obj.thumbUrl = list[i]?.includes('http') ? list[i] : (list[i].includes('svg') ? await convertUrlToBase64(`${window.origin}${downloadFileUrl}?filePath=${list[i]}${site ? `&_site=${site}` : ''}`) : `${window.origin}${downloadFileUrl}?filePath=${list[i]}${site ? `&_site=${site}` : ''}`)
}
fileList.push(_obj);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment