fix: View option for binary-data shouldn't download the file on Chrome/Edge (#4995)
* delete unused code * fix: Do not set the `Content-Disposition` header when viewing binary files * remove the duplicate styles. these already exist in BinaryDataDisplayEmbed.vue
This commit is contained in:
committed by
GitHub
parent
80e07f86ac
commit
e225c3190e
@@ -1515,7 +1515,9 @@ class App {
|
||||
identifier,
|
||||
);
|
||||
if (mimeType) res.setHeader('Content-Type', mimeType);
|
||||
if (fileName) res.setHeader('Content-Disposition', `attachment; filename="${fileName}"`);
|
||||
if (req.query.mode === 'download' && fileName) {
|
||||
res.setHeader('Content-Disposition', `attachment; filename="${fileName}"`);
|
||||
}
|
||||
res.setHeader('Content-Length', fileSize);
|
||||
res.sendFile(binaryPath);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user