feat: add Content-Disposition header for file downloads in download_scale_results
- Enhanced the download_scale_results function to include a Content-Disposition header, specifying the filename for the "psychoscales.db" file download. This improves the user experience by prompting the correct file name during downloads.
This commit is contained in:
parent
3eb477161e
commit
1bd19235e0
1
app.py
1
app.py
@ -273,6 +273,7 @@ async def download_scale_results(scale_id: str, db: Session = Depends(get_db)):
|
||||
return FileResponse(
|
||||
"psychoscales.db",
|
||||
headers={
|
||||
"Content-Disposition": f'attachment; filename="psychoscales.db"',
|
||||
"Cache-Control": "no-store, no-cache, must-revalidate, max-age=0",
|
||||
"Pragma": "no-cache",
|
||||
"Expires": "0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user