Fix issue with non-ASCII filename in single-asset download
This commit is contained in:
+2
-1
@@ -120,7 +120,8 @@ class Render {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (attachment && asset.originalFileName) {
|
if (attachment && asset.originalFileName) {
|
||||||
res.setHeader('Content-Disposition', `attachment; filename="${this.getFilename(asset, servedSize)}"`)
|
const filename = encodeURI(this.getFilename(asset, servedSize))
|
||||||
|
res.setHeader('Content-Disposition', `attachment; filename*=UTF-8''${filename}`)
|
||||||
}
|
}
|
||||||
headerList.forEach(header => {
|
headerList.forEach(header => {
|
||||||
const value = data.headers.get(header)
|
const value = data.headers.get(header)
|
||||||
|
|||||||
Reference in New Issue
Block a user