add new file url of the app provider to the ocs capabilities

This commit is contained in:
Willy Kloucek
2021-12-15 10:43:53 +01:00
parent f35133d4bd
commit 32f7af851d
3 changed files with 16 additions and 1 deletions
@@ -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
+2 -1
View File
@@ -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"
}
]
}
+6
View File
@@ -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 {
@@ -938,6 +939,7 @@ func DefaultConfig() *Config {
WopiDriver: WopiDriver{},
AppsURL: "/app/list",
OpenURL: "/app/open",
NewURL: "/app/new",
},
Configs: nil,
UploadMaxChunkSize: 1e+8,
@@ -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
{