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
8a3d2067
Commit
8a3d2067
authored
Mar 22, 2023
by
comfyanonymous
Browse files
Merge branch 'image-content-disposition-filename' of
https://github.com/pythongosssss/ComfyUI
parents
a8aa623a
3c25f5dc
Changes
1
Show 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 @
8a3d2067
...
...
@@ -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