Skip to content

Commit

Permalink
fix(api): image downloads with correct filename
Browse files Browse the repository at this point in the history
Closes #6730
  • Loading branch information
psychedelicious committed Aug 10, 2024
1 parent 09d1e19 commit 56969b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions invokeai/app/api/routers/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,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)
Expand Down

0 comments on commit 56969b0

Please sign in to comment.