|
|
|
@ -18,5 +18,23 @@ try {
|
|
|
|
|
}
|
|
|
|
|
config = require("../config/config.example");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var isPositiveNumber = function (n) {
|
|
|
|
|
return (!isNaN(n) && n >= 0);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (!isPositiveNumber(config.inactiveTime)) {
|
|
|
|
|
config.inactiveTime = 90;
|
|
|
|
|
}
|
|
|
|
|
if (!isPositiveNumber(config.archiveRetentionTime)) {
|
|
|
|
|
config.archiveRetentionTime = 90;
|
|
|
|
|
}
|
|
|
|
|
if (!isPositiveNumber(config.maxUploadSize)) {
|
|
|
|
|
config.maxUploadSize = 20 * 1024 * 1024;
|
|
|
|
|
}
|
|
|
|
|
if (!isPositiveNumber(config.defaultStorageLimit)) {
|
|
|
|
|
config.defaultStorageLimit = 50 * 1024 * 1024;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = config;
|
|
|
|
|
|
|
|
|
|