mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	attach extension to download file if note present
This commit is contained in:
		| @@ -38,13 +38,7 @@ async function getNoteRevision(req) { | ||||
|  * @return {string} | ||||
|  */ | ||||
| function getRevisionFilename(noteRevision) { | ||||
|     let filename = noteRevision.title || "untitled"; | ||||
|  | ||||
|     if (noteRevision.type === 'text') { | ||||
|         filename += '.html'; | ||||
|     } else if (['relation-map', 'search'].includes(noteRevision.type)) { | ||||
|         filename += '.json'; | ||||
|     } | ||||
|     let filename = utils.formatDownloadTitle(noteRevision.title, noteRevision.type, noteRevision.mime); | ||||
|  | ||||
|     const extension = path.extname(filename); | ||||
|     const date = noteRevision.dateCreated | ||||
| @@ -158,4 +152,4 @@ module.exports = { | ||||
|     eraseAllNoteRevisions, | ||||
|     eraseNoteRevision, | ||||
|     restoreNoteRevision | ||||
| }; | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user