Skip to content

Commit

Permalink
Adjust to new app provider implementation of create file
Browse files Browse the repository at this point in the history
  • Loading branch information
diocas committed Dec 14, 2021
1 parent db7076c commit 0c8afa1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/web-app-files/src/components/AppBar/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,9 @@ export default {
},
async addAppProviderFile(fileName) {
try {
const path = pathUtil.join(this.currentPath, fileName)
const url = '/app/new?filename=' + path
const parent = this.currentFolder.fileId
// TODO shouuld url be a capability?
const url = `/app/new?parent_container_id=${parent}&filename=${fileName}`
const headers = new Headers()
if (!this.isPublicFilesRoute) {
headers.append('Authorization', 'Bearer ' + this.getToken)
Expand All @@ -563,6 +564,7 @@ export default {
throw new Error(message)
}
const path = pathUtil.join(this.currentPath, fileName)
let resource
if (this.isPersonalRoute) {
resource = await this.$client.files.fileInfo(path, DavProperties.Default)
Expand Down

0 comments on commit 0c8afa1

Please sign in to comment.