mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
parent
ebbc1fb67d
commit
32e04a2b96
@ -46,7 +46,7 @@ export function embed(
|
||||
const disposition = response.headers['content-disposition'];
|
||||
let filename = '';
|
||||
if (disposition && disposition.indexOf('attachment') !== -1) {
|
||||
let filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/;
|
||||
let filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/i;
|
||||
let matches = filenameRegex.exec(disposition);
|
||||
if (matches != null && matches[1]) {
|
||||
filename = matches[1].replace(/['"]/g, '');
|
||||
|
Loading…
Reference in New Issue
Block a user