Populate attachment file size
// FREEBIE
This commit is contained in:
@@ -38538,6 +38538,9 @@ MessageReceiver.prototype.extend({
|
|||||||
handleAttachment: function(attachment) {
|
handleAttachment: function(attachment) {
|
||||||
attachment.id = attachment.id.toString();
|
attachment.id = attachment.id.toString();
|
||||||
attachment.key = attachment.key.toArrayBuffer();
|
attachment.key = attachment.key.toArrayBuffer();
|
||||||
|
if (attachment.size) {
|
||||||
|
attachment.size = attachment.size.toNumber();
|
||||||
|
}
|
||||||
if (attachment.digest) {
|
if (attachment.digest) {
|
||||||
attachment.digest = attachment.digest.toArrayBuffer();
|
attachment.digest = attachment.digest.toArrayBuffer();
|
||||||
}
|
}
|
||||||
@@ -39052,6 +39055,9 @@ MessageSender.prototype = {
|
|||||||
if (attachment.fileName) {
|
if (attachment.fileName) {
|
||||||
proto.fileName = attachment.fileName;
|
proto.fileName = attachment.fileName;
|
||||||
}
|
}
|
||||||
|
if (attachment.size) {
|
||||||
|
proto.size = attachment.size;
|
||||||
|
}
|
||||||
return proto;
|
return proto;
|
||||||
});
|
});
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
@@ -229,7 +229,8 @@
|
|||||||
resolve({
|
resolve({
|
||||||
data: e.target.result,
|
data: e.target.result,
|
||||||
contentType: file.type,
|
contentType: file.type,
|
||||||
fileName: file.name
|
fileName: file.name,
|
||||||
|
size: file.size
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
FR.onerror = reject;
|
FR.onerror = reject;
|
||||||
|
@@ -344,6 +344,9 @@ MessageReceiver.prototype.extend({
|
|||||||
handleAttachment: function(attachment) {
|
handleAttachment: function(attachment) {
|
||||||
attachment.id = attachment.id.toString();
|
attachment.id = attachment.id.toString();
|
||||||
attachment.key = attachment.key.toArrayBuffer();
|
attachment.key = attachment.key.toArrayBuffer();
|
||||||
|
if (attachment.size) {
|
||||||
|
attachment.size = attachment.size.toNumber();
|
||||||
|
}
|
||||||
if (attachment.digest) {
|
if (attachment.digest) {
|
||||||
attachment.digest = attachment.digest.toArrayBuffer();
|
attachment.digest = attachment.digest.toArrayBuffer();
|
||||||
}
|
}
|
||||||
|
@@ -127,6 +127,9 @@ MessageSender.prototype = {
|
|||||||
if (attachment.fileName) {
|
if (attachment.fileName) {
|
||||||
proto.fileName = attachment.fileName;
|
proto.fileName = attachment.fileName;
|
||||||
}
|
}
|
||||||
|
if (attachment.size) {
|
||||||
|
proto.size = attachment.size;
|
||||||
|
}
|
||||||
return proto;
|
return proto;
|
||||||
});
|
});
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
Reference in New Issue
Block a user