mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-11-17 22:42:09 +08:00
list filter attachment sizes in bytes
This commit is contained in:
parent
97af5287e4
commit
7beedf01d8
1 changed files with 5 additions and 3 deletions
|
|
@ -1095,8 +1095,9 @@ function getFilterStrings(filter, mailboxes) {
|
|||
}
|
||||
|
||||
if (filter.query.size) {
|
||||
let unit = 'B';
|
||||
// let unit = 'B';
|
||||
let size = Math.abs(filter.query.size || 0);
|
||||
/*
|
||||
if (size) {
|
||||
if (filter.query.size % (1024 * 1024) === 0) {
|
||||
unit = 'MB';
|
||||
|
|
@ -1106,10 +1107,11 @@ function getFilterStrings(filter, mailboxes) {
|
|||
size = Math.round(size / 1024);
|
||||
}
|
||||
}
|
||||
*/
|
||||
if (filter.query.size > 0) {
|
||||
query.push(['larger', size + unit]);
|
||||
query.push(['larger', size /*+ unit*/]);
|
||||
} else if (filter.query.size < 0) {
|
||||
query.push(['smaller', size + unit]);
|
||||
query.push(['smaller', size /*+ unit*/]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue