expose maxUploadSize and premiumUploadSize via /api/config
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user