Skip to content

Commit

Permalink
chore: remove attachment attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
clostao committed Jan 30, 2025
1 parent 16bd781 commit a325056
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/controllers/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ objectController.get(
const safeName = encodeURIComponent(metadata.name || 'download')
if (metadata.type === 'file') {
res.set('Content-Type', metadata.mimeType || 'application/octet-stream')
res.set('Content-Disposition', `attachment; filename="${safeName}"`)
res.set('Content-Disposition', `filename="${safeName}"`)
res.set('Content-Length', metadata.totalSize.toString())
const compressedButNoEncrypted =
metadata.uploadOptions?.compression &&
Expand All @@ -356,7 +356,7 @@ objectController.get(
}
} else {
res.set('Content-Type', 'application/zip')
res.set('Content-Disposition', `attachment; filename="${safeName}.zip"`)
res.set('Content-Disposition', `filename="${safeName}.zip"`)
}

pipeline(await startDownload(), res, (err) => {
Expand Down

0 comments on commit a325056

Please sign in to comment.