---优化文件预览功能
This commit is contained in:
@ -359,11 +359,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handlePreview = async (file) => {
|
const handlePreview = async (file) => {
|
||||||
const fileUrl = file.presignedUrl|| file.response?.data?.fileUrl || file.fileUrl;
|
// const fileUrl = file.presignedUrl|| file.response?.data?.fileUrl || file.fileUrl;
|
||||||
console.log(fileUrl, 'fileUrl', file)
|
// console.log(fileUrl, 'fileUrl', file)
|
||||||
window.open(fileUrl)
|
// window.open(fileUrl)
|
||||||
|
|
||||||
const fileUrl = file.response?.data?.fileUrl || file.fileUrl;
|
const fileUrl = file.presignedUrl|| file.response?.data?.fileUrl || file.fileUrl;
|
||||||
const fileName = file.response?.data?.fileOrg || file.fileOrg;
|
const fileName = file.response?.data?.fileOrg || file.fileOrg;
|
||||||
let fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl;
|
let fileFullUrl = fileUrl.includes('http://') || fileUrl.includes('https://') ? fileUrl : location.origin + getAppEnvConfig().VITE_GLOB_API_URL + fileUrl;
|
||||||
fileFullUrl+="&fullfilename="+fileName;
|
fileFullUrl+="&fullfilename="+fileName;
|
||||||
|
|||||||
Reference in New Issue
Block a user