renamed "attachment" to "file" for consistency

This commit is contained in:
azivner
2018-03-27 22:11:06 -04:00
parent 913b6bb6f6
commit 7464835058
12 changed files with 75 additions and 75 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;
}