fix: 修复返回参数下载文件名乱码

master
shuxiaokai 1 year ago
parent fa5ca39501
commit dd93b36845

@ -88,7 +88,7 @@ async function formatResponseBuffer(bufferData: Buffer, contentType?: string) {
const headers = store.state['apidoc/response'].header;
const contentDisposition = headers['content-disposition'] as string;
let fileName = '';
const matchedContentDisposition = contentDisposition.match(/filename=(.*)/)
const matchedContentDisposition = contentDisposition?.match(/filename=(.*)/)
if (matchedContentDisposition) {
fileName = matchedContentDisposition[1];
}

Loading…
Cancel
Save