git.99rst.org
/
flatnotes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
1043892
)
Add GET /api/attachments endpoint.
author
Adam Dullage
<redacted>
Tue, 6 Feb 2024 19:34:46 +0000
(19:34 +0000)
committer
Adam Dullage
<redacted>
Tue, 6 Feb 2024 19:34:46 +0000
(19:34 +0000)
server/main.py
patch
|
blob
|
history
diff --git
a/server/main.py
b/server/main.py
index f751a29ec60faad3015bb033a4524674d10fcea3..6c52ebbda8ccdcedaf76a5aa3dc596df12e55929 100644
(file)
--- 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,
git clone https://git.99rst.org/PROJECT