mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-25 15:55:18 +00:00
Correct the Content-Disposition Header for preview image, in order to download as corrent filename
To avoid download a webp preview image with a '.png' filename
This commit is contained in:
parent
4c82741b54
commit
8fe0e5391e
@ -420,7 +420,7 @@ class PromptServer():
|
||||
buffer.seek(0)
|
||||
|
||||
return web.Response(body=buffer.read(), content_type=f'image/{image_format}',
|
||||
headers={"Content-Disposition": f"filename=\"{filename}\""})
|
||||
headers={"Content-Disposition": f"filename=\"{filename.replace('png', image_format)}\""})
|
||||
|
||||
if 'channel' not in request.rel_url.query:
|
||||
channel = 'rgba'
|
||||
|
Loading…
Reference in New Issue
Block a user