mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	chore(lint): get rid of "any" in attachments
req.file is of type "Express.Multer.File | undefined". Returning with an "uploaded: false" type object -> same handling as in image.ts
This commit is contained in:
		| @@ -43,7 +43,14 @@ function saveAttachment(req: Request) { | ||||
|  | ||||
| function uploadAttachment(req: Request) { | ||||
|     const { noteId } = req.params; | ||||
|     const { file } = req as any; | ||||
|     const { file } = req; | ||||
|  | ||||
|     if (!file) { | ||||
|         return { | ||||
|             uploaded: false, | ||||
|             message: `Missing attachment data.` | ||||
|         }; | ||||
|     } | ||||
|  | ||||
|     const note = becca.getNoteOrThrow(noteId); | ||||
|     let url; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user