-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added filename to FileResponse #164
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @jcadam14!
src/sbl_filing_api/routers/filing.py
Outdated
@@ -235,7 +235,7 @@ async def get_latest_submission_report(request: Request, lei: str, period_code: | |||
file_data = await submission_processor.get_from_storage( | |||
period_code, lei, str(latest_sub.id) + submission_processor.REPORT_QUALIFIER | |||
) | |||
return FileResponse(path=file_data, media_type="text/csv") | |||
return FileResponse(path=file_data, media_type="text/csv", filename=f"{latest_sub.id}validation_report.csv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be easier to read if we put a _
between the id and the suffix? e.g. 1_validation_report.csv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #163