Include the mimetype with the file info. Store the objectURL in state so that it can be used normally by the exising templates

This commit is contained in:
Mark Haines 2016-11-04 11:52:47 +00:00
parent 842b5aed56
commit 12fc70c671
2 changed files with 58 additions and 25 deletions

View file

@ -193,6 +193,9 @@ class ContentMessages {
// with the information needed to decrypt the attachment and
// add it under a file key.
encryptInfo.url = url;
if (file.type) {
encryptInfo.mimetype = file.type;
}
content.file = encryptInfo;
}
return matrixClient.sendMessage(roomId, content);