修改文件下载方式,使用StreamingResponseBody,支持大文件下载
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
|
||||
const fileDown = (obj) => {
|
||||
const path = obj.getAttribute("value");
|
||||
window.open(Fmt.ctx() + '/download/execute?path=' + encodeURIComponent(path) + '&temp=' + false);
|
||||
window.open(Fmt.ctx() + '/download/file?path=' + encodeURIComponent(path) + '&temp=' + false);
|
||||
};
|
||||
|
||||
window.onload = () => {
|
||||
@@ -139,7 +139,7 @@
|
||||
};
|
||||
Fmt.axios(options).then((result) => {
|
||||
message.update({content: '压缩包' + result.filename + "创建完成,准备下载文件......", result: 'success'}).show();
|
||||
window.open(Fmt.ctx() + '/download/execute?path=' + encodeURIComponent(result.path) + '&temp=' + true);
|
||||
window.open(Fmt.ctx() + '/download/file?path=' + encodeURIComponent(result.path) + '&temp=' + true);
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
new axMessage({content: err, result: 'error', iconShow: true}).show();
|
||||
|
||||
Reference in New Issue
Block a user