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
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():
return
web
.
Response
(
status
=
403
)
output_dir
=
full_output_dir
file
=
request
.
rel_url
.
query
[
"filename"
]
file
=
os
.
path
.
basename
(
file
)
file
=
os
.
path
.
join
(
output_dir
,
file
)
file
name
=
request
.
rel_url
.
query
[
"filename"
]
file
name
=
os
.
path
.
basename
(
file
name
)
file
=
os
.
path
.
join
(
output_dir
,
file
name
)
if
os
.
path
.
isfile
(
file
):
return
web
.
FileResponse
(
file
)
return
web
.
FileResponse
(
file
,
headers
=
{
"Content-Disposition"
:
f
"filename=
\"
{
filename
}
\"
"
}
)
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