Add GET /api/attachments endpoint.
authorAdam Dullage <redacted>
Tue, 6 Feb 2024 19:34:46 +0000 (19:34 +0000)
committerAdam Dullage <redacted>
Tue, 6 Feb 2024 19:34:46 +0000 (19:34 +0000)
server/main.py

index f751a29ec60faad3015bb033a4524674d10fcea3..6c52ebbda8ccdcedaf76a5aa3dc596df12e55929 100644 (file)
@@ -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,
git clone https://git.99rst.org/PROJECT