Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
Felix Hamme
cyberjudo
Commits
afd686a4
Commit
afd686a4
authored
Mar 22, 2021
by
Felix Hamme
Browse files
backend: allow '/' in image names
parent
743bae9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/backend/v1_images.py
View file @
afd686a4
...
...
@@ -10,7 +10,7 @@ from .cyberjudo import CyberJudo
def
get_images_router
(
cyberjudo
:
CyberJudo
,
images_dir
:
str
,
cjc
:
CyberJudoCrypto
):
router
=
APIRouter
()
@
router
.
get
(
'/named-images/{name}'
,
response_class
=
FileResponse
,
@
router
.
get
(
'/named-images/{name
:path
}'
,
response_class
=
FileResponse
,
description
=
'this directly returns an image (mime type depending on the file), if known'
)
def
get_image_by_name
(
name
:
str
):
if
not
cyberjudo
.
image_is_known
(
name
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment