diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2021-12-29 14:54:40 +0100 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2021-12-30 10:09:33 +0000 |
commit | 4d32f11ad0c667510f2633b5ab0e85f00d40e49b (patch) | |
tree | 57c1a62664a4f3218bb8eea1a6fd2105ee427ca1 /apps/files/src | |
parent | bfaeb6ae64b01d591c8122ccb8ba4f7af98652c7 (diff) | |
download | nextcloud-server-4d32f11ad0c667510f2633b5ab0e85f00d40e49b.tar.gz nextcloud-server-4d32f11ad0c667510f2633b5ab0e85f00d40e49b.zip |
fix template picker for file actions using the fileInfoModel
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files/src')
-rw-r--r-- | apps/files/src/views/TemplatePicker.vue | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files/src/views/TemplatePicker.vue b/apps/files/src/views/TemplatePicker.vue index 7c866db8a58..0d18de0df43 100644 --- a/apps/files/src/views/TemplatePicker.vue +++ b/apps/files/src/views/TemplatePicker.vue @@ -213,8 +213,11 @@ export default { ) this.logger.debug('Created new file', fileInfo) - await fileList?.addAndFetchFileInfo(this.name) + const data = await fileList?.addAndFetchFileInfo(this.name).then((status, data) => data) + const model = new OCA.Files.FileInfoModel(data, { + filesClient: fileList?.filesClient, + }) // Run default action const fileAction = OCA.Files.fileActions.getDefaultFileAction(fileInfo.mime, 'file', OC.PERMISSION_ALL) fileAction.action(fileInfo.basename, { @@ -222,7 +225,7 @@ export default { dir: currentDirectory, fileList, fileActions: fileList?.fileActions, - fileInfoModel: fileList?.getModelForFile(this.name), + fileInfoModel: model, }) this.close() |