Ensure outgoing attachment size always matches resized image
This commit is contained in:
parent
2c3847affe
commit
1b9959aca3
1 changed files with 3 additions and 1 deletions
|
@ -523,9 +523,11 @@
|
|||
return new Promise((resolve, reject) => {
|
||||
const FR = new FileReader();
|
||||
FR.onload = e => {
|
||||
const data = e.target.result;
|
||||
resolve({
|
||||
...attachment,
|
||||
data: e.target.result,
|
||||
data,
|
||||
size: data.byteLength,
|
||||
});
|
||||
};
|
||||
FR.onerror = reject;
|
||||
|
|
Loading…
Add table
Reference in a new issue