mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	camel casing and fixes
This commit is contained in:
		| @@ -26,8 +26,8 @@ async function uploadFile(req) { | ||||
|         mime: file.mimetype | ||||
|     }); | ||||
|  | ||||
|     await labelService.createLabel(note.noteId, "original_file_name", originalName); | ||||
|     await labelService.createLabel(note.noteId, "file_size", size); | ||||
|     await labelService.createLabel(note.noteId, "originalFileName", originalName); | ||||
|     await labelService.createLabel(note.noteId, "fileSize", size); | ||||
|  | ||||
|     return { | ||||
|         noteId: note.noteId | ||||
| @@ -48,7 +48,7 @@ async function downloadFile(req, res) { | ||||
|     } | ||||
|  | ||||
|     const labelMap = await note.getLabelMap(); | ||||
|     const fileName = labelMap.original_file_name ? labelMap.original_file_name : note.title; | ||||
|     const fileName = labelMap.originalFileName || note.title; | ||||
|  | ||||
|     res.setHeader('Content-Disposition', 'file; filename="' + fileName + '"'); | ||||
|     res.setHeader('Content-Type', note.mime); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user