Don't try to send documents via connectors
This commit is contained in:
parent
3a81751d42
commit
bfa8786fb4
1 changed files with 9 additions and 0 deletions
|
@ -33,6 +33,15 @@ Zotero.Translate.ItemSaver.ATTACHMENT_MODE_FILE = 2;
|
|||
|
||||
Zotero.Translate.ItemSaver.prototype = {
|
||||
"saveItem":function(item) {
|
||||
// don't save documents as documents, since we can't pass them around
|
||||
for(var i in item.attachments) {
|
||||
if(item.attachments[i].document) {
|
||||
item.attachments[i].url = item.attachments[i].document.location.href;
|
||||
delete item.attachments[i].document;
|
||||
}
|
||||
}
|
||||
|
||||
// save items
|
||||
this.newItems.push(item);
|
||||
Zotero.Connector.callMethod("saveItems", {"items":[item]}, function(success) {});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue