mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-07-21 19:48:24 +00:00
Attachment size limits, per-user and per-organization
This commit is contained in:
parent
c5b97f4146
commit
325039c316
4 changed files with 83 additions and 8 deletions
12
src/error.rs
12
src/error.rs
|
@ -211,6 +211,18 @@ macro_rules! err {
|
|||
}};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! err_discard {
|
||||
($msg:expr, $data:expr) => {{
|
||||
std::io::copy(&mut $data.open(), &mut std::io::sink()).ok();
|
||||
return Err(crate::error::Error::new($msg, $msg));
|
||||
}};
|
||||
($usr_msg:expr, $log_value:expr, $data:expr) => {{
|
||||
std::io::copy(&mut $data.open(), &mut std::io::sink()).ok();
|
||||
return Err(crate::error::Error::new($usr_msg, $log_value));
|
||||
}};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! err_json {
|
||||
($expr:expr, $log_value:expr) => {{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue