mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 08:16:43 -04:00
Merge pull request #30448 from nextcloud/backport/30440/stable21
[stable21] Make sure to get file model in template picker
This commit is contained in:
commit
949fb2343a
3 changed files with 7 additions and 4 deletions
2
apps/files/js/dist/main.js
vendored
2
apps/files/js/dist/main.js
vendored
File diff suppressed because one or more lines are too long
2
apps/files/js/dist/main.js.map
vendored
2
apps/files/js/dist/main.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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