From: Adam Dullage Date: Tue, 6 Feb 2024 19:34:46 +0000 (+0000) Subject: Add GET /api/attachments endpoint. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=f8caa015166199dd0c8f9086f06eee9e99a9e750;p=flatnotes.git Add GET /api/attachments endpoint. --- diff --git a/server/main.py b/server/main.py index f751a29..6c52ebb 100644 --- a/server/main.py +++ b/server/main.py @@ -178,6 +178,12 @@ def get_config(): # region Attachments # Get Attachment +@app.get( + "/api/attachments/{filename}", + dependencies=auth_deps, +) +# Include a secondary route used to create relative URLs that can be used +# outside the context of flatnotes (e.g. "/attachments/image.jpg"). @app.get( "/attachments/{filename}", dependencies=auth_deps,