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

New feature: File download support #702

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

EnotShow
Copy link
Contributor

Now if the database value is the file path and the file exists it will be shown as a downloadable file

Before:
image
After:
image

Changes affect templates: deteils.html, list.html

- Added file downloading support for admin
- Added tests for new feature
@EnotShow EnotShow mentioned this pull request Jan 23, 2024
1 task
@agn-7
Copy link
Contributor

agn-7 commented Jan 26, 2024

This PR solves the #701 issue.

@aminalaee aminalaee linked an issue Jan 31, 2024 that may be closed by this pull request
1 task
@EnotShow
Copy link
Contributor Author

EnotShow commented Feb 1, 2024

I decided that the user wants to have not only a download method but a reading method too. Now, besides the download method, there's an additional option to open files directly in a browser.

Additionally, I've addressed a security concern from the previous version. Instead of using file paths in the URL, which is insecure.

Now the result looks like:
image

Please let me know when you check my MR. I'm will grateful for the feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add file downloading
3 participants