Allow translators to specify that attachment URLs shouldn't be proxied

Translators can include `proxy: false` in the attachment object to
indicate that the URL should be used as is, without further proxying.
This generally isn't necessary, but sometimes it is (e.g., on
EBSCOhost), and in theory we should start using this whenever a PDF URL
is extracted from the page instead of being constructed manually by the
translator.

Closes #1612
This commit is contained in:
Dan Stillman 2018-12-26 06:19:45 -05:00
parent 4072d444e7
commit 4bc8fab4f5

View file

@ -771,7 +771,7 @@ Zotero.Translate.Sandbox = {
delete attachment.path;
}
if(attachment.url) {
if (attachment.url && attachment.proxy !== false) {
// Remap attachment (but not link) URLs
// TODO: provide both proxied and un-proxied URLs (also for documents)
// because whether the attachment is attached as link or file