Skip to content

Commit

Permalink
Set content-type in response header
Browse files Browse the repository at this point in the history
  • Loading branch information
shri committed Sep 4, 2024
1 parent 51a9e69 commit a14df4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/domain/jobs/controllers/job_posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ async def get_job_post_pdf(
return Response(
media_type=content_type,
content=file_content,
headers={"Content-Disposition": f"attachment; filename={job_post_id}"},
headers={
"Content-Disposition": f"attachment; filename={job_post_id}.pdf",
"Content-Type": content_type,
},
)
except s3_client.exceptions.NoSuchKey:
raise NotFoundException(detail=f"Job post PDF not found.")
Expand Down

0 comments on commit a14df4c

Please sign in to comment.