actually fixed filename preview on telegram properly

This commit is contained in:
uh wot 2023-07-02 02:28:54 +02:00
parent 2c0ce0f720
commit daa8aa5da6
Signed by: uhwot
GPG Key ID: CB2454984587B781
1 changed files with 1 additions and 1 deletions

View File

@ -262,7 +262,7 @@ async function track(env, id, format, tagging, range_header, user_agent) {
if (user_agent === null || !user_agent.startsWith('TelegramBot')) {
content_disposition = `inline; filename*=UTF-8''${encodeRFC5987ValueChars(filename)}`
} else {
content_disposition = `inline; filename="${filename.replaceAll('"', (c) => `\\${c}`)}"`
content_disposition = `inline; filename="${filename.replaceAll('"', '%22')}"`
}
let init = { method: 'GET', headers: {} }