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

refactor: download function #721

Merged
merged 3 commits into from
Mar 21, 2024
Merged

refactor: download function #721

merged 3 commits into from
Mar 21, 2024

Conversation

Yelinz
Copy link
Member

@Yelinz Yelinz commented Mar 4, 2024

refresh when downloadURL is expired
extract download function from document-card

This fix prevents serving expired download and webdav urls. A fresh webdav link is always fetched before opening as we dont know when it expires. The download url is parsed for expiry date and only refetched if its expired.

Also fixes the problem that after a replace the old file is still served.

@Yelinz Yelinz requested review from anehx and czosel March 4, 2024 10:45
@Yelinz Yelinz force-pushed the fix-download branch 3 times, most recently from 73b6d54 to 02f7374 Compare March 8, 2024 10:22
@Yelinz Yelinz linked an issue Mar 8, 2024 that may be closed by this pull request
@czosel
Copy link
Contributor

czosel commented Mar 21, 2024

conflicts :-/

Yelinz added 2 commits March 21, 2024 08:58
refresh when downloadURL is expired
extract download function from document-card
@czosel
Copy link
Contributor

czosel commented Mar 21, 2024

LGTM for the rest, nice work! 💯

move download and error handler into utils
@Yelinz Yelinz self-assigned this Mar 21, 2024
@czosel czosel merged commit 5d7699b into main Mar 21, 2024
9 checks passed
@czosel czosel deleted the fix-download branch March 21, 2024 08:56
@adfinisbot
Copy link
Collaborator

🎉 This PR is included in version 7.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Expired download URL
3 participants