expose maxUploadSize and premiumUploadSize via /api/config

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

No files matched your search

+6
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;