Skip to content

Commit

Permalink
add new file url of the app provider to the ocs capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek committed Dec 15, 2021
1 parent f35133d commit 32f7af8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions changelog/unreleased/enhancement-add-new-file-capability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Enhancement: add new file url of the app provider to the ocs capabilities

We've added the new file capability of the app provider to the ocs capabilities, so that
clients can discover this url analogous to the app list and file open urls.

https://github.com/owncloud/ocis/pull/2884
https://github.com/cs3org/reva/pull/2379
https://github.com/owncloud/web/pull/5890#issuecomment-993905242
3 changes: 2 additions & 1 deletion docs/extensions/storage/apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ The capabilities endpoint (eg. `https://localhost:9200/ocs/v1.php/cloud/capabili
"enabled": true,
"version": "1.0.0",
"apps_url": "/app/list",
"open_url": "/app/open"
"open_url": "/app/open",
"new_url": "/app/new"
}
]
}
Expand Down
6 changes: 6 additions & 0 deletions storage/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ type AppProvider struct {
WopiDriver WopiDriver `ocisConfig:"wopi_driver"`
AppsURL string `ocisConfig:"apps_url"`
OpenURL string `ocisConfig:"open_url"`
NewURL string `ocisConfig:"new_url"`
}

type WopiDriver struct {
Expand Down Expand Up @@ -938,6 +939,7 @@ func DefaultConfig() *Config {
WopiDriver: WopiDriver{},
AppsURL: "/app/list",
OpenURL: "/app/open",
NewURL: "/app/new",
},
Configs: nil,
UploadMaxChunkSize: 1e+8,
Expand Down Expand Up @@ -1317,6 +1319,10 @@ func structMappings(cfg *Config) []shared.EnvBinding {
EnvVars: []string{"STORAGE_FRONTEND_APP_PROVIDER_OPEN_URL"},
Destination: &cfg.Reva.AppProvider.OpenURL,
},
{
EnvVars: []string{"STORAGE_FRONTEND_APP_PROVIDER_NEW_URL"},
Destination: &cfg.Reva.AppProvider.NewURL,
},

// gateway
{
Expand Down

0 comments on commit 32f7af8

Please sign in to comment.