Skip to content

Commit

Permalink
Merge pull request #767 from rommapp/romm-729
Browse files Browse the repository at this point in the history
[ROMM-729] Fix content disposition header
  • Loading branch information
zurdi15 authored Mar 29, 2024
2 parents ef8c3b9 + ff0d96a commit 6f67520
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/endpoints/rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def head_rom_content(request: Request, id: int, file_name: str):
path=rom_path if not rom.multi else f"{rom_path}/{rom.files[0]}",
filename=file_name,
headers={
"Content-Disposition": f"attachment; filename={rom.name}.zip",
"Content-Disposition": f'attachment; filename="{rom.name}.zip"',
"Content-Type": "application/zip",
"Content-Length": str(rom.file_size_bytes),
},
Expand Down Expand Up @@ -232,7 +232,7 @@ def contents(f):
return CustomStreamingResponse(
zipped_chunks,
media_type="application/zip",
headers={"Content-Disposition": f"attachment; filename={file_name}.zip"},
headers={"Content-Disposition": f'attachment; filename="{file_name}.zip"'},
emit_body={"id": rom.id},
)

Expand Down

0 comments on commit 6f67520

Please sign in to comment.