From 8ecf72838d86fd4010ff24f6518a4e95fb07501f Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 10 Aug 2024 17:54:26 +1000 Subject: [PATCH] fix(api): image downloads with correct filename Closes #6730 --- invokeai/app/api/routers/images.py | 1 + 1 file changed, 1 insertion(+) diff --git a/invokeai/app/api/routers/images.py b/invokeai/app/api/routers/images.py index 3157878573..14652ea784 100644 --- a/invokeai/app/api/routers/images.py +++ b/invokeai/app/api/routers/images.py @@ -253,6 +253,7 @@ async def get_image_full( content = f.read() response = Response(content, media_type="image/png") response.headers["Cache-Control"] = f"max-age={IMAGE_MAX_AGE}" + response.headers["Content-Disposition"] = f'inline; filename="{image_name}"' return response except Exception: raise HTTPException(status_code=404)