Skip to content
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

Backend needs to send contract filename #338

Open
luciatugui opened this issue Jul 29, 2024 · 0 comments
Open

Backend needs to send contract filename #338

luciatugui opened this issue Jul 29, 2024 · 0 comments
Assignees
Labels
back-end bug 🐛 Something isn't working web-app
Milestone

Comments

@luciatugui
Copy link
Contributor

Description

In the web app, when trying to download one of the contracts, the file being downloaded has a name similar to this one: d4eff344-eada-4c7b-bd10-21f952d7fc5c-Test which is the name coming from the backend.
Ideally, we would want a custom name, maybe involving the volunteer name.

In the frontend, we are trying to send a custom name for the file, by setting the download attribute of the <a> element:
<a href="something" download="Custom_Contract_Name". The problem is that the download attribute sets the name of the file only in the cases of same-origin, which is not our case, therefore being ignored.

Possible Solution

The backend could sent a Content-Disposition header that specifies a filename.

Issue was first mentioned here: #318 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end bug 🐛 Something isn't working web-app
Projects
None yet
Development

No branches or pull requests

2 participants