mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
renamed "attachment" to "file" for consistency
This commit is contained in:
@@ -22,7 +22,7 @@ router.get('/:noteId/', auth.checkApiAuthOrElectron, wrap(async (req, res, next)
|
||||
|
||||
pack.finalize();
|
||||
|
||||
res.setHeader('Content-Disposition', 'attachment; filename="' + name + '.tar"');
|
||||
res.setHeader('Content-Disposition', 'file; filename="' + name + '.tar"');
|
||||
res.setHeader('Content-Type', 'application/tar');
|
||||
|
||||
pack.pipe(res);
|
||||
|
||||
@@ -65,7 +65,7 @@ router.get('/download/:noteId', auth.checkApiAuthOrElectron, wrap(async (req, re
|
||||
const labelMap = await labels.getNoteLabelMap(noteId);
|
||||
const fileName = labelMap.original_file_name ? labelMap.original_file_name : note.title;
|
||||
|
||||
res.setHeader('Content-Disposition', 'attachment; filename=' + fileName);
|
||||
res.setHeader('Content-Disposition', 'file; filename=' + fileName);
|
||||
res.setHeader('Content-Type', note.mime);
|
||||
|
||||
res.send(note.content);
|
||||
@@ -26,7 +26,7 @@ router.get('/:noteId', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
protected_session.decryptNote(req, detail);
|
||||
|
||||
if (detail.type === 'file') {
|
||||
// no need to transfer (potentially large) attachment payload for this request
|
||||
// no need to transfer (potentially large) file payload for this request
|
||||
detail.content = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user