assign file size for in-band attachments

This commit is contained in:
or-else
2023-01-05 13:22:08 -08:00
parent c0e4cd4965
commit f99f5a223f
7 changed files with 187 additions and 257 deletions
+6 -1
View File
@@ -891,7 +891,12 @@ class MessagesView extends React.Component {
} else {
// Small enough to send inband.
fileToBase64(file)
.then(b64 => this.sendMessage(Drafty.attachFile(null, {mime: b64.mime, data: b64.bits, filename: b64.name})))
.then(b64 => this.sendMessage(Drafty.attachFile(null, {
mime: b64.mime,
data: b64.bits,
filename: b64.name,
size: file.size
})))
.catch(err => this.props.onError(err.message, 'err'));
}
}