expose maxUploadSize and premiumUploadSize via /api/config
This commit is contained in:
parent
50b9c27dcb
commit
53ed247bc2
@ -36,5 +36,11 @@ if (!isPositiveNumber(config.defaultStorageLimit)) {
|
|||||||
config.defaultStorageLimit = 50 * 1024 * 1024;
|
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;
|
module.exports = config;
|
||||||
|
|
||||||
|
|||||||
@ -225,7 +225,9 @@ var serveConfig = (function () {
|
|||||||
adminEmail: config.adminEmail,
|
adminEmail: config.adminEmail,
|
||||||
adminKeys: admins,
|
adminKeys: admins,
|
||||||
inactiveTime: config.inactiveTime,
|
inactiveTime: config.inactiveTime,
|
||||||
supportMailbox: config.supportMailboxPublicKey
|
supportMailbox: config.supportMailboxPublicKey,
|
||||||
|
maxUploadSize: config.maxUploadSize,
|
||||||
|
premiumUploadSize: config.premiumUploadSize,
|
||||||
}, null, '\t'),
|
}, null, '\t'),
|
||||||
'obj.httpSafeOrigin = ' + (function () {
|
'obj.httpSafeOrigin = ' + (function () {
|
||||||
if (config.httpSafeOrigin) { return '"' + config.httpSafeOrigin + '"'; }
|
if (config.httpSafeOrigin) { return '"' + config.httpSafeOrigin + '"'; }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user