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 authored and hipsterusername committed Aug 10, 2024
1 parent c3ab8a6 commit 2aa20bb
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 @@ -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)
Expand Down

0 comments on commit 2aa20bb

Please sign in to comment.