remove route without filename

This commit is contained in:
Tom 2022-05-09 16:17:14 +02:00
parent 65c725c21e
commit f0f9274a3c
2 changed files with 3 additions and 1 deletions

View File

@ -285,7 +285,8 @@ function register(app) {
apiRoute(POST, '/api/special-notes/search-note', specialNotesRoute.createSearchNote);
apiRoute(POST, '/api/special-notes/save-search-note', specialNotesRoute.saveSearchNote);
route(GET, ['/api/images/:noteId/:filename', '/api/images/:noteId'], [auth.checkApiAuthOrElectron], imageRoute.returnImage);
// :filename is not used by trilium, but instead used for "save as" to assign a human readable filename
route(GET, '/api/images/:noteId/:filename', [auth.checkApiAuthOrElectron], imageRoute.returnImage);
route(POST, '/api/images', [auth.checkApiAuthOrElectron, uploadMiddleware, csrfMiddleware], imageRoute.uploadImage, apiResultHandler);
route(PUT, '/api/images/:noteId', [auth.checkApiAuthOrElectron, uploadMiddleware, csrfMiddleware], imageRoute.updateImage, apiResultHandler);

View File

@ -110,6 +110,7 @@ function register(router) {
res.send(note.getContent());
});
// :filename is not used by trilium, but instead used for "save as" to assign a human readable filename
router.get('/share/api/images/:noteId/:filename', (req, res, next) => {
shacaLoader.ensureLoad();