Support String for options.file in Zotero.Attachments.linkFromFile (#1005)

This commit is contained in:
Joscha Legewie 2016-05-22 13:42:39 -04:00 • committed by Dan Stillman
parent e21a914a1f
commit 0ae070970a

View file

@ -121,7 +121,7 @@ Zotero.Attachments = new function(){
/**
* @param {nsIFile} [options.file] - File to link to
* @param {nsIFile|String} [options.file] - File to add
* @param {Integer[]|String[]} [options.parentItemID] - Parent item to add item to
* @param {Integer[]} [options.collections] - Collection keys or ids to add new item to
* @param {Object} [options.saveOptions] - Options to pass to Zotero.Item::save()
@ -130,7 +130,7 @@ Zotero.Attachments = new function(){
this.linkFromFile = Zotero.Promise.coroutine(function* (options) {
Zotero.debug('Linking attachment from file');
var file = options.file;
var file = Zotero.File.pathToFile(options.file);
var parentItemID = options.parentItemID;
var collections = options.collections;
var saveOptions = options.saveOptions;