From 32f7af851d3caa9a175c63af11837b3a3b252474 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 15 Dec 2021 10:43:53 +0100 Subject: [PATCH] add new file url of the app provider to the ocs capabilities --- .../unreleased/enhancement-add-new-file-capability.md | 8 ++++++++ docs/extensions/storage/apps.md | 3 ++- storage/pkg/config/config.go | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/enhancement-add-new-file-capability.md diff --git a/changelog/unreleased/enhancement-add-new-file-capability.md b/changelog/unreleased/enhancement-add-new-file-capability.md new file mode 100644 index 00000000000..57fe8c5b5ec --- /dev/null +++ b/changelog/unreleased/enhancement-add-new-file-capability.md @@ -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 diff --git a/docs/extensions/storage/apps.md b/docs/extensions/storage/apps.md index aa7247828cd..1ca902ba69c 100644 --- a/docs/extensions/storage/apps.md +++ b/docs/extensions/storage/apps.md @@ -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" } ] } diff --git a/storage/pkg/config/config.go b/storage/pkg/config/config.go index 0687716b316..6691edda405 100644 --- a/storage/pkg/config/config.go +++ b/storage/pkg/config/config.go @@ -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 {