summary refs log tree commit diff
path: root/src/ChatPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ChatPage.cpp')
-rw-r--r--src/ChatPage.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp
index d6f6940b..35d262ac 100644
--- a/src/ChatPage.cpp
+++ b/src/ChatPage.cpp
@@ -331,7 +331,7 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
 
                   http::client()->upload(
                     payload,
-                    mime.name().toStdString(),
+                    encryptedFile ? "application/octet-stream" : mime.name().toStdString(),
                     QFileInfo(fn).fileName().toStdString(),
                     [this,
                      room_id  = current_room_,
@@ -379,6 +379,9 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
                        QSize dimensions) {
                         text_input_->hideUploadSpinner();
 
+                        if (encryptedFile)
+                                encryptedFile->url = url.toStdString();
+
                         if (mimeClass == "image")
                                 view_manager_->queueImageMessage(
                                   roomid, filename, encryptedFile, url, mime, dsize, dimensions);