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…
Reference in a new issue