www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 47a5aafda30f8823a1eb84dceff56e90bf53c82e
parent f6c3f58bc2ae674d1cffdbacf2f9332b0825a7a9
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon, 12 Nov 2012 00:42:41 -0500

Remap attachment URLs so that they are saved through the proxy

Diffstat:
Mchrome/content/zotero/xpcom/translation/translate.js | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -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