Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
3c25f5dc
"examples/git@developer.sourcefind.cn:change/sglang.git" did not exist on "7e28c67d19ddea8c74fca7b7e6dd2e3e3bec3c37"
Commit
3c25f5dc
authored
Mar 22, 2023
by
pythongosssss
Browse files
Add content disposition header so images have name
parent
f67c0062
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
server.py
server.py
+4
-4
No files found.
server.py
View file @
3c25f5dc
...
@@ -129,12 +129,12 @@ class PromptServer():
...
@@ -129,12 +129,12 @@ class PromptServer():
return
web
.
Response
(
status
=
403
)
return
web
.
Response
(
status
=
403
)
output_dir
=
full_output_dir
output_dir
=
full_output_dir
file
=
request
.
rel_url
.
query
[
"filename"
]
file
name
=
request
.
rel_url
.
query
[
"filename"
]
file
=
os
.
path
.
basename
(
file
)
file
name
=
os
.
path
.
basename
(
file
name
)
file
=
os
.
path
.
join
(
output_dir
,
file
)
file
=
os
.
path
.
join
(
output_dir
,
file
name
)
if
os
.
path
.
isfile
(
file
):
if
os
.
path
.
isfile
(
file
):
return
web
.
FileResponse
(
file
)
return
web
.
FileResponse
(
file
,
headers
=
{
"Content-Disposition"
:
f
"filename=
\"
{
filename
}
\"
"
}
)
return
web
.
Response
(
status
=
404
)
return
web
.
Response
(
status
=
404
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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