From 1e639b08682a2de83055fc5ab51664faef183fb6 Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Mon, 22 May 2017 14:23:46 +0200 Subject: [PATCH] mediaapi/config: Document that MaxFileSizeBytes 0 means unlimited --- .../dendrite/cmd/dendrite-media-api-server/main.go | 11 ++++++----- .../matrix-org/dendrite/mediaapi/config/config.go | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/cmd/dendrite-media-api-server/main.go b/src/github.com/matrix-org/dendrite/cmd/dendrite-media-api-server/main.go index d7191508a..b053076a2 100644 --- a/src/github.com/matrix-org/dendrite/cmd/dendrite-media-api-server/main.go +++ b/src/github.com/matrix-org/dendrite/cmd/dendrite-media-api-server/main.go @@ -31,11 +31,12 @@ import ( ) var ( - bindAddr = os.Getenv("BIND_ADDRESS") - dataSource = os.Getenv("DATABASE") - logDir = os.Getenv("LOG_DIR") - serverName = os.Getenv("SERVER_NAME") - basePath = os.Getenv("BASE_PATH") + bindAddr = os.Getenv("BIND_ADDRESS") + dataSource = os.Getenv("DATABASE") + logDir = os.Getenv("LOG_DIR") + serverName = os.Getenv("SERVER_NAME") + basePath = os.Getenv("BASE_PATH") + // Note: if the MAX_FILE_SIZE_BYTES is set to 0, it will be unlimited maxFileSizeBytesString = os.Getenv("MAX_FILE_SIZE_BYTES") ) diff --git a/src/github.com/matrix-org/dendrite/mediaapi/config/config.go b/src/github.com/matrix-org/dendrite/mediaapi/config/config.go index c7346d313..6163f2315 100644 --- a/src/github.com/matrix-org/dendrite/mediaapi/config/config.go +++ b/src/github.com/matrix-org/dendrite/mediaapi/config/config.go @@ -27,6 +27,7 @@ type MediaAPI struct { AbsBasePath types.Path `yaml:"abs_base_path"` // The maximum file size in bytes that is allowed to be stored on this server. // Note that remote files larger than this can still be proxied to a client, they will just not be cached. + // Note: if MaxFileSizeBytes is set to 0, the size is unlimited. MaxFileSizeBytes types.ContentLength `yaml:"max_file_size_bytes"` // The postgres connection config for connecting to the database e.g a postgres:// URI DataSource string `yaml:"database"`