mirror of
https://github.com/zotero/zotero.git
synced 2026-09-23 00:43:17 +00:00
Remap attachment URLs so that they are saved through the proxy
This commit is contained in:
parent
f6c3f58bc2
commit
47a5aafda3
1 changed files with 11 additions and 0 deletions
|
|
@ -598,6 +598,17 @@ Zotero.Translate.Sandbox = {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remap attachment (but not link) URLs
|
||||
var properToProxy = translate.translator[0].properToProxy;
|
||||
if(properToProxy && item.attachments) {
|
||||
for(var i=0; i<item.attachments.length; i++) {
|
||||
var attachment = item.attachments[i];
|
||||
if(attachment.snapshot !== false && attachment.url) {
|
||||
attachment.url = properToProxy(attachment.url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// call super
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue