diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index 83c566af46..3eb81dfe3d 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -1558,6 +1558,7 @@ class filemanager_ui * @param string $action eg. 'delete', ... * @param array $selected selected path(s) * @param string $dir=null current directory + * @param string[] $props Properties for the file, eg: [comment => 'Latest from Ralf'] * @see static::action() */ public static function ajax_action($action, $selected, $dir=null, $props=null) diff --git a/filemanager/js/app.js b/filemanager/js/app.js index 4fc0ba2d2f..e3f1b94478 100644 --- a/filemanager/js/app.js +++ b/filemanager/js/app.js @@ -306,7 +306,7 @@ var filemanagerAPP = /** @class */ (function (_super) { var widget = _event.data; var value = widget.getValue(); value.conflict = _conflict; - egw.json(_target, ['upload', value, _path, this.egw.window.location.pathname], this._upload_callback, this, true, this).sendRequest(); + egw.json(_target, ['upload', value, _path, { ui_path: this.egw.window.location.pathname }], this._upload_callback, this, true, this).sendRequest(); widget.set_value(''); } }; diff --git a/filemanager/js/app.ts b/filemanager/js/app.ts index df39292a77..9410f07761 100644 --- a/filemanager/js/app.ts +++ b/filemanager/js/app.ts @@ -349,7 +349,7 @@ export class filemanagerAPP extends EgwApp let widget = _event.data; let value = widget.getValue(); value.conflict = _conflict; - egw.json(_target, ['upload', value, _path, this.egw.window.location.pathname], + egw.json(_target, ['upload', value, _path, {ui_path: this.egw.window.location.pathname}], this._upload_callback, this, true, this ).sendRequest(); widget.set_value(''); diff --git a/filemanager/src/Sharing/HiddenUpload.php b/filemanager/src/Sharing/HiddenUpload.php index c933c8657d..445daa1639 100644 --- a/filemanager/src/Sharing/HiddenUpload.php +++ b/filemanager/src/Sharing/HiddenUpload.php @@ -63,7 +63,7 @@ class HiddenUpload extends AnonymousList * @param string $action Should be 'upload' * @param $selected Array of file information * @param string $dir Target directory - * @param $props path the sharing UI is running eg. "/egroupware/share.php/" + * @param string[] $props ui_path=>path the sharing UI is running eg. "/egroupware/share.php/" * @param string[] $arr Result * * @throws Api\Exception\AssertionFailed @@ -72,7 +72,7 @@ class HiddenUpload extends AnonymousList { Translation::add_app('filemanager'); $vfs = Vfs::mount(); - $GLOBALS['egw']->sharing[Sharing::get_token($props)]->redo(); + $GLOBALS['egw']->sharing[Sharing::get_token($props['ui_path'])]->redo(); parent::handle_upload_action($action, $selected, $dir, null, $arr); if ($arr['files']) {