From 1dd46b875b77e031748b10a9ad08d8c597907a35 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 13 Nov 2020 19:22:06 +0100 Subject: [PATCH] this is fine actually, as it will get encrypted. just don't pass it to the upload --- src/matrix/room/AttachmentUpload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/room/AttachmentUpload.js b/src/matrix/room/AttachmentUpload.js index 013bf150..75a5bfb1 100644 --- a/src/matrix/room/AttachmentUpload.js +++ b/src/matrix/room/AttachmentUpload.js @@ -100,10 +100,10 @@ export class AttachmentUpload { } let prefix = urlPath.substr(0, urlPath.lastIndexOf("url")); setPath(`${prefix}info.size`, content, this._transferredBlob.size); - setPath(`${prefix}info.mimetype`, content, this._transferredBlob.mimeType); + setPath(`${prefix}info.mimetype`, content, this._unencryptedBlob.mimeType); if (this._isEncrypted) { setPath(`${prefix}file`, content, Object.assign(this._encryptionInfo, { - mimetype: this._transferredBlob.mimeType, + mimetype: this._unencryptedBlob.mimeType, url: this._mxcUrl })); } else {