【更新】代码生成下载压缩包名字乱码问题修复

pull/56/head
小诺 2022-11-09 20:19:36 +08:00 committed by 俞宝山
parent e1780efdfd
commit 84888ca6da
2 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@
const patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
const $link = document.createElement("a");
$link.href = URL.createObjectURL(blob);
$link.download = patt.exec(contentDisposition)[1]
$link.download = decodeURIComponent(patt.exec(contentDisposition)[1])
$link.click();
document.body.appendChild($link);
document.body.removeChild($link); //

View File

@ -135,7 +135,7 @@
const patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
const $link = document.createElement("a");
$link.href = URL.createObjectURL(blob);
$link.download = patt.exec(contentDisposition)[1]
$link.download = decodeURIComponent(patt.exec(contentDisposition)[1])
$link.click();
document.body.appendChild($link);
document.body.removeChild($link); //