Remap attachment URLs so that they are saved through the proxy

This commit is contained in:
Simon Kornblith 2012-11-12 00:42:41 -05:00
parent f6c3f58bc2
commit 47a5aafda3

View file

@ -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