From 2aa20bb9642ece7ef20df46a40332e325213c34b 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 31578785732..14652ea7848 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)