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

Option to explictely download an attachment instead of opening it #451

Closed
tnajdek opened this issue Sep 5, 2021 · 1 comment
Closed

Comments

@tnajdek
Copy link
Member

tnajdek commented Sep 5, 2021

Clicking on the attachment's file name or "open link" icon in the attachments lists fires API request for pre-auth link, then immediately opens that link. In some scenarios it might be desirable to save the contents of the attachment instead.

https://forums.zotero.org/discussion/91582/image-stops-audio-continues-in-video-projection#latest

@tnajdek
Copy link
Member Author

tnajdek commented Oct 6, 2021

Option 1 is to obtain the URL, generate a element with download attribute and simulate click on it. For this to work, URL needs to be same origin, so we would need a proxy, something like zotero.org/files/* -> files.zotero.org/*.

Option 2 is to have a new UI in attachment details that will request URL and render it as an a element with a little visual timer. User can then right-click -> save as.

Option 3 as above but automatically request URL for user when attachment details is opened.

@tnajdek tnajdek closed this as completed in 0070edb Oct 6, 2021
tnajdek added a commit that referenced this issue Oct 12, 2021
Timestamp is now taken after the request has been processed, not before.
This way if a request is fired 60 seconds later, it is guaranteed to
receive a fresh URL. The downside is that before that second request
comes back, the URL rendered is stale. To fix this a server-side change
is needed: zotero/dataserver#115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant