fixed content-disposition filename encoding
This commit is contained in:
parent
7f6c507926
commit
fb190ef605
4
main.js
4
main.js
|
@ -256,12 +256,14 @@ async function track(env, id, format, tagging, range_header) {
|
|||
let title = json.SNG_TITLE
|
||||
if (json.VERSION) title += ` ${json.VERSION}`
|
||||
|
||||
const filename = `${title} [${id}].${formats[format].ext}`
|
||||
|
||||
let init = { method: 'GET', headers: {} }
|
||||
let resp_init = {
|
||||
status: 200,
|
||||
headers: {
|
||||
'content-type': formats[format].mime,
|
||||
'content-disposition': `inline; filename="${title.replaceAll('"', '\\"')} [${id}].${formats[format].ext}"`,
|
||||
'content-disposition': `inline; filename*=utf-8''${encodeURIComponent(filename)}`,
|
||||
'accept-ranges': 'bytes'
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue