mirror of
https://github.com/zotero/zotero.git
synced 2026-10-07 02:58:09 +00:00
Support String for options.file in Zotero.Attachments.linkFromFile (#1005)
This commit is contained in:
parent
e21a914a1f
commit
0ae070970a
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue