mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-27 06:59:18 -06:00
Merge pull request #6453 from owncloud/add-companion-url-config
feat: add uppy companion url config
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
Enhancement: Add companion URL config
|
||||
|
||||
Introduce a config to set the Uppy Companion URL via `WEB_OPTION_UPLOAD_COMPANION_URL`.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/6453
|
||||
@@ -194,7 +194,7 @@ func Sanitize(cfg *config.Config) {
|
||||
cfg.Web.Config.Options.FeedbackLink = nil
|
||||
}
|
||||
// remove Upload parent if no value is set
|
||||
if cfg.Web.Config.Options.Upload.XHR.Timeout == 0 {
|
||||
if cfg.Web.Config.Options.Upload.XHR.Timeout == 0 && cfg.Web.Config.Options.Upload.CompanionURL == "" {
|
||||
cfg.Web.Config.Options.Upload = nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,8 @@ type Routing struct {
|
||||
|
||||
// Upload are the upload options
|
||||
type Upload struct {
|
||||
XHR XHR `json:"xhr,omitempty" yaml:"xhr"`
|
||||
XHR XHR `json:"xhr,omitempty" yaml:"xhr"`
|
||||
CompanionURL string `json:"companionUrl,omitempty" yaml:"companionUrl" env:"WEB_OPTION_UPLOAD_COMPANION_URL" desc:"Sets the URL of Companion which is a service provided by Uppy to import files from external cloud providers. See https://uppy.io/docs/companion/ for instructions on how to set up Companion. This feature is disabled as long as no URL is given."`
|
||||
}
|
||||
|
||||
// XHR are the XHR options
|
||||
|
||||
Reference in New Issue
Block a user