mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
use RECOMMENDED_FILE_SIZE also for sys.msgsize_max_recommended
This commit is contained in:
committed by
Alexander Krotov
parent
893eb8b73b
commit
a80632ab36
@@ -8,6 +8,7 @@ use crate::constants::DC_VERSION_STR;
|
|||||||
use crate::context::Context;
|
use crate::context::Context;
|
||||||
use crate::dc_tools::*;
|
use crate::dc_tools::*;
|
||||||
use crate::job::*;
|
use crate::job::*;
|
||||||
|
use crate::mimefactory::RECOMMENDED_FILE_SIZE;
|
||||||
use crate::stock::StockMessage;
|
use crate::stock::StockMessage;
|
||||||
use rusqlite::NO_PARAMS;
|
use rusqlite::NO_PARAMS;
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ impl Context {
|
|||||||
rel_path.map(|p| dc_get_abs_path(self, &p).to_string_lossy().into_owned())
|
rel_path.map(|p| dc_get_abs_path(self, &p).to_string_lossy().into_owned())
|
||||||
}
|
}
|
||||||
Config::SysVersion => Some((&*DC_VERSION_STR).clone()),
|
Config::SysVersion => Some((&*DC_VERSION_STR).clone()),
|
||||||
Config::SysMsgsizeMaxRecommended => Some(format!("{}", 24 * 1024 * 1024 / 4 * 3)),
|
Config::SysMsgsizeMaxRecommended => Some(format!("{}", RECOMMENDED_FILE_SIZE)),
|
||||||
Config::SysConfigKeys => Some(get_config_keys_string()),
|
Config::SysConfigKeys => Some(get_config_keys_string()),
|
||||||
_ => self.sql.get_raw_config(self, key),
|
_ => self.sql.get_raw_config(self, key),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ use crate::stock::StockMessage;
|
|||||||
// (brutto examples: web.de=50, 1&1=40, t-online.de=32, gmail=25, posteo=50, yahoo=25, all-inkl=100).
|
// (brutto examples: web.de=50, 1&1=40, t-online.de=32, gmail=25, posteo=50, yahoo=25, all-inkl=100).
|
||||||
// as an upper limit, we double the size; the core won't send messages larger than this
|
// as an upper limit, we double the size; the core won't send messages larger than this
|
||||||
// to get the netto sizes, we subtract 1 mb header-overhead and the base64-overhead.
|
// to get the netto sizes, we subtract 1 mb header-overhead and the base64-overhead.
|
||||||
const RECOMMENDED_FILE_SIZE: u64 = 24 * 1024 * 1024 / 4 * 3;
|
pub const RECOMMENDED_FILE_SIZE: u64 = 24 * 1024 * 1024 / 4 * 3;
|
||||||
const UPPER_LIMIT_FILE_SIZE: u64 = 49 * 1024 * 1024 / 4 * 3;
|
const UPPER_LIMIT_FILE_SIZE: u64 = 49 * 1024 * 1024 / 4 * 3;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|||||||
Reference in New Issue
Block a user