mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
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>
This commit is contained in:
parent
4fde409901
commit
35b8f06501
1 changed files with 5 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue