expose maxUploadSize and premiumUploadSize via /api/config

This commit is contained in:
ansuz
2020-03-03 16:47:44 -05:00
parent 50b9c27dcb
commit 53ed247bc2
2 changed files with 9 additions and 1 deletions

View File

@@ -36,5 +36,11 @@ if (!isPositiveNumber(config.defaultStorageLimit)) {
config.defaultStorageLimit = 50 * 1024 * 1024;
}
// premiumUploadSize is worthless if it isn't a valid positive number
// or if it's less than the default upload size
if (!isPositiveNumber(config.premiumUploadSize) || config.premiumUploadSize < config.defaultStorageLimit) {
delete config.premiumUploadSize;
}
module.exports = config;