zotero / zotero-connectors

Chrome, Firefox, Edge, and Safari extensions for Zotero
https://www.zotero.org/download/connectors
Other
480 stars 119 forks source link

Always use open PDF for attachment regardless of translator #431

Closed dstillman closed 1 year ago

dstillman commented 1 year ago

https://forums.zotero.org/discussion/104281/chrome-extension-saves-different-version-paper

In https://github.com/zotero/translators/pull/2967, we changed the DOI translator to extract DOIs from the URL. This can create a weird situation where, if you're viewing a PDF at a URL with a DOI in it, Zotero will save using the DOI metadata and ignore the current PDF, even going out and fetching an OA PDF instead.

Ideally, we would always save an open PDF as the attachment even if we use a translator to save. We can definitely do that for the DOI translator, which will never have a PDF, but I think even for a site translator we could just ignore any PDF from the translator? In theory there could be a case where a translator returned other PDFs, but that seems exceedingly unlikely — and if people are viewing a PDF, they clearly want to save that file.

If we can't fix this easily, we should probably revert the DOI change for now — it's pretty confusing to get a different file from the one you're viewing.