解决前端文件下载报文件不存在的错误

This commit is contained in:
zhoumingfa 2024-07-24 20:42:33 +08:00
parent 201b6a5018
commit 36e554d8ed
3 changed files with 4 additions and 4 deletions

View File

@ -270,7 +270,7 @@
//
async function download(file) {
try {
await fileApi.downLoadFile(file.fileName, file.fileKey);
await fileApi.downLoadFile(file.fileKey);
} catch (e) {
smartSentry.captureError(e);
}

View File

@ -32,7 +32,7 @@ export const fileApi = {
/**
* 下载文件流根据fileKey @author 胡克
*/
downLoadFile: (fileName, fileKey) => {
return getDownload(fileName, '/support/file/downLoad', { fileKey });
downLoadFile: (fileKey) => {
return getDownload('/support/file/downLoad', { fileKey });
},
};

View File

@ -270,7 +270,7 @@ function view(file) {
//
async function download(file) {
try {
await fileApi.downLoadFile(file.fileName, file.fileKey);
await fileApi.downLoadFile(file.fileKey);
} catch (e) {
smartSentry.captureError(e);
}