diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index a46cf7969..c9a2a03a4 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -425,7 +425,7 @@ Zotero.Attachments = new function(){ /** * Create a link attachment from a URL * - * @param {Object} options - 'url', 'parentItemID', 'contentType', 'title' + * @param {Object} options - 'url', 'parentItemID', 'contentType', 'title', 'collections' * @return {Promise} - A promise for the created attachment item */ this.linkFromURL = Zotero.Promise.coroutine(function* (options) { @@ -435,6 +435,7 @@ Zotero.Attachments = new function(){ var parentItemID = options.parentItemID; var contentType = options.contentType; var title = options.title; + var collections = options.collections; /* Throw error on invalid URLs We currently accept the following protocols: @@ -490,11 +491,12 @@ Zotero.Attachments = new function(){ } return _addToDB({ - url: url, - title: title, + url, + title, linkMode: this.LINK_MODE_LINKED_URL, - contentType: contentType, - parentItemID: parentItemID + contentType, + parentItemID, + collections }); });