mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-08 15:33:09 -06:00
cmd/dendrite-media-api-server: Move os.Getenv() for consistency
This commit is contained in:
parent
1057e2e117
commit
04c4a2d05a
|
|
@ -35,6 +35,7 @@ var (
|
||||||
logDir = os.Getenv("LOG_DIR")
|
logDir = os.Getenv("LOG_DIR")
|
||||||
serverName = os.Getenv("SERVER_NAME")
|
serverName = os.Getenv("SERVER_NAME")
|
||||||
basePath = os.Getenv("BASE_PATH")
|
basePath = os.Getenv("BASE_PATH")
|
||||||
|
maxFileSizeBytesString = os.Getenv("MAX_FILE_SIZE_BYTES")
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
@ -50,7 +51,7 @@ func main() {
|
||||||
if serverName == "" {
|
if serverName == "" {
|
||||||
serverName = "localhost"
|
serverName = "localhost"
|
||||||
}
|
}
|
||||||
maxFileSizeBytes, err := strconv.ParseInt(os.Getenv("MAX_FILE_SIZE_BYTES"), 10, 64)
|
maxFileSizeBytes, err := strconv.ParseInt(maxFileSizeBytesString, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
maxFileSizeBytes = 10 * 1024 * 1024
|
maxFileSizeBytes = 10 * 1024 * 1024
|
||||||
log.Infof("Failed to parse MAX_FILE_SIZE_BYTES. Defaulting to %v bytes.", maxFileSizeBytes)
|
log.Infof("Failed to parse MAX_FILE_SIZE_BYTES. Defaulting to %v bytes.", maxFileSizeBytes)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue