support larger upload sizes for users with premium accounts
This commit is contained in:
@@ -43,6 +43,7 @@ module.exports.create = function (config, cb) {
|
||||
//historyKeeper: config.historyKeeper,
|
||||
intervals: config.intervals || {},
|
||||
maxUploadSize: config.maxUploadSize || (20 * 1024 * 1024),
|
||||
premiumUploadSize: false, // overridden below...
|
||||
Sessions: {},
|
||||
paths: {},
|
||||
//msgStore: config.store,
|
||||
@@ -70,6 +71,13 @@ module.exports.create = function (config, cb) {
|
||||
domain: config.domain
|
||||
};
|
||||
|
||||
(function () {
|
||||
var pes = config.premiumUploadSize;
|
||||
if (!isNaN(pes) && pes >= Env.maxUploadSize) {
|
||||
Env.premiumUploadSize = pes;
|
||||
}
|
||||
}());
|
||||
|
||||
var paths = Env.paths;
|
||||
|
||||
var keyOrDefaultString = function (key, def) {
|
||||
|
||||
Reference in New Issue
Block a user