Add global TUS capability + some config

Added global TUS capability in the config structure.
Added config switches for the advertised max chunk size and http method
override.
This commit is contained in:
Vincent Petry
2020-06-02 10:21:57 +02:00
parent f5272f3828
commit 699f3c4d4e
4 changed files with 35 additions and 0 deletions
+16
View File
@@ -157,5 +157,21 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
},
// Chunking
&cli.IntFlag{
Name: "upload-max-chunk-size",
Value: 0,
Usage: "Max chunk size in bytes to advertise to clients through capabilities",
EnvVars: []string{"REVA_FRONTEND_UPLOAD_MAX_CHUNK_SIZE"},
Destination: &cfg.Reva.UploadMaxChunkSize,
},
&cli.StringFlag{
Name: "upload-http-method-override",
Value: "",
Usage: "Specify an HTTP method (ex: POST) to use when uploading in case OPTIONS and PATCH are not available",
EnvVars: []string{"REVA_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE"},
Destination: &cfg.Reva.UploadHttpMethodOverride,
},
}
}