Skip to content

Commit

Permalink
Use basename
Browse files Browse the repository at this point in the history
  • Loading branch information
petebachant committed Aug 22, 2024
1 parent c1abde0 commit c90a390
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/app/api/routes/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,9 @@ def get_project_figures(
f"Figure content is now {len(fig['content'])} long"
)
kws = {}
kws["ResponseContentDisposition"] = f"filename={path}"
kws["ResponseContentDisposition"] = (
f"filename={os.path.basename(path)}"
)
url = fs.url(fpath, expires=3600 * 24, **kws)
logger.info(f"Generated presigned URL for {path}: {url}")
fig["url"] = url
Expand Down

0 comments on commit c90a390

Please sign in to comment.