diff --git a/lib/form/dndupload.js b/lib/form/dndupload.js index bf7316a794a..2e1514c9c3f 100644 --- a/lib/form/dndupload.js +++ b/lib/form/dndupload.js @@ -91,6 +91,7 @@ M.form_dndupload.init = function(Y, options) { this.maxfiles = options.maxfiles; this.maxbytes = options.maxbytes; this.itemid = options.itemid; + this.author = options.author; this.container = this.Y.one('#'+options.containerid); if (options.filemanager) { @@ -452,6 +453,9 @@ M.form_dndupload.init = function(Y, options) { formdata.append('sesskey', M.cfg.sesskey); formdata.append('repo_id', this.repositoryid); formdata.append('itemid', this.itemid); + if (this.author) { + formdata.append('author', this.author); + } if (this.filemanager) { // Filepickers do not have folders formdata.append('savepath', this.filemanager.currentpath); } diff --git a/lib/form/filemanager.js b/lib/form/filemanager.js index 592dc1c876a..6627c2a9d21 100644 --- a/lib/form/filemanager.js +++ b/lib/form/filemanager.js @@ -963,6 +963,7 @@ M.form_filemanager.init = function(Y, options) { filemanager: manager, acceptedtypes: options.accepted_types, clientid: options.client_id, + author: options.author, maxfiles: options.maxfiles, maxbytes: options.maxbytes, itemid: options.itemid, diff --git a/lib/form/filepicker.js b/lib/form/filepicker.js index 4b5de337f64..e372a23c086 100644 --- a/lib/form/filepicker.js +++ b/lib/form/filepicker.js @@ -47,6 +47,7 @@ M.form_filepicker.init = function(Y, options) { var dndoptions = { clientid: options.client_id, acceptedtypes: options.accepted_types, + author: options.author, maxfiles: -1, maxbytes: options.maxbytes, itemid: options.itemid,