mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-17 10:56:39 +08:00
解决前端文件下载报文件不存在的错误
This commit is contained in:
parent
201b6a5018
commit
36e554d8ed
@ -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);
|
||||
}
|
||||
|
@ -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 });
|
||||
},
|
||||
};
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user