mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-07-05 01:58:15 +08:00
fix: 🐛 文件下载编码匹配
[skip ci]
This commit is contained in:
@ -90,7 +90,7 @@ axios.interceptors.response.use(
|
||||
//此处判断是否下载请求
|
||||
if (response.headers['content-type'] === 'application/octet-stream') {
|
||||
//根据响应头获取文件名称
|
||||
let fileName = response.headers['content-disposition'].match(/filename\*=UTF-8''([^;]+)/)[1]
|
||||
let fileName = response.headers['content-disposition'].match(/filename\*=UTF-8''([^;]+)/i)[1]
|
||||
if (fileName) {
|
||||
fileName = decodeURI(fileName)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user