mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(hooks): 修复oss下载时未转码问题
This commit is contained in:
@ -115,7 +115,8 @@ export function useDownload() {
|
|||||||
|
|
||||||
await handleResponse(response);
|
await handleResponse(response);
|
||||||
|
|
||||||
const finalFilename = filename || response.headers.get('Download-Filename') || `download-${timestamp}`;
|
const rawHeader = response.headers.get('Download-Filename');
|
||||||
|
const finalFilename = filename || (rawHeader ? decodeURIComponent(rawHeader) : null) || `download-${timestamp}`;
|
||||||
|
|
||||||
if (response.body && isHttps()) {
|
if (response.body && isHttps()) {
|
||||||
const contentLength = Number(response.headers.get('Content-Length'));
|
const contentLength = Number(response.headers.get('Content-Length'));
|
||||||
|
|||||||
Reference in New Issue
Block a user