From c30b2a1dd78e5de3b99384942d0c6d9f20b229d9 Mon Sep 17 00:00:00 2001 From: Willy Kloucek <34452982+wkloucek@users.noreply.github.com> Date: Mon, 27 Sep 2021 09:38:41 +0200 Subject: [PATCH] add max num files and max size to the archiver capabilities (#2106) --- changelog/unreleased/archiver-capabilities-limits.md | 7 +++++++ internal/http/services/owncloud/ocs/data/capabilities.go | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 changelog/unreleased/archiver-capabilities-limits.md diff --git a/changelog/unreleased/archiver-capabilities-limits.md b/changelog/unreleased/archiver-capabilities-limits.md new file mode 100644 index 00000000000..f6c96a03386 --- /dev/null +++ b/changelog/unreleased/archiver-capabilities-limits.md @@ -0,0 +1,7 @@ +Enhancement: Add maximum files and size to archiver capabilities + +We added the maximum files count and maximum archive size of the archiver to the capabilities endpoint. +Clients can use this to generate warnings before the actual archive creation fails. + +https://github.com/owncloud/ocis/issues/2537 +https://github.com/cs3org/reva/pull/2105 diff --git a/internal/http/services/owncloud/ocs/data/capabilities.go b/internal/http/services/owncloud/ocs/data/capabilities.go index cdf1b94e228..c94f07408bf 100644 --- a/internal/http/services/owncloud/ocs/data/capabilities.go +++ b/internal/http/services/owncloud/ocs/data/capabilities.go @@ -107,6 +107,8 @@ type CapabilitiesArchiver struct { Version string `json:"version" xml:"version" mapstructure:"version"` Formats []string `json:"formats" xml:"formats" mapstructure:"formats"` ArchiverURL string `json:"archiver_url" xml:"archiver_url" mapstructure:"archiver_url"` + MaxNumFiles string `json:"max_num_files" xml:"max_num_files" mapstructure:"max_num_files"` + MaxSize string `json:"max_size" xml:"max_size" mapstructure:"max_size"` } // CapabilitiesAppProvider holds available app provider information