Skip to content

Commit

Permalink
Merge pull request #103 from 0xDE4DB33F/fix-multiple-content-disposit…
Browse files Browse the repository at this point in the history
…ion-error

Fix net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION error
  • Loading branch information
forscht authored Dec 1, 2023
2 parents 7ddb310 + b4cf34b commit 4e0dc1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http/api/routes/file/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports.handler = async (req, reply) => {
const resHeaders = {
'Content-Length': file.size,
'Accept-Ranges': 'bytes',
'Content-Disposition': `attachment; filename=${encodeURI(file.name)}`,
'Content-Disposition': `attachment; filename="${encodeURI(file.name)}"`,
}
const mimeType = mime.lookup(path.extname(file.name))
if (mimeType) resHeaders['Content-Type'] = mimeType
Expand Down

0 comments on commit 4e0dc1d

Please sign in to comment.