diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-06-30 17:15:02 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-06-30 17:15:02 +0200 |
commit | aca9d8036c53c0d0689ed94d67d7c5071d74b14e (patch) | |
tree | a83e95883ed69fc34fb745345c88ee249b1ed906 /src/main/java/eu/siacs/conversations/http | |
parent | 6af97c724cdcc7d94070a99e9035d84373c5eb75 (diff) |
made httpconnection (download) ready all kind of files
Diffstat (limited to 'src/main/java/eu/siacs/conversations/http')
-rw-r--r-- | src/main/java/eu/siacs/conversations/http/HttpConnection.java | 4 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpConnection.java b/src/main/java/eu/siacs/conversations/http/HttpConnection.java index d2550b47..002611dc 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpConnection.java @@ -269,8 +269,8 @@ public class HttpConnection implements Downloadable { } private void updateImageBounds() { - message.setType(Message.TYPE_IMAGE); - mXmppConnectionService.getFileBackend().updateFileParams(message,mUrl); + message.setType(Message.TYPE_FILE); + mXmppConnectionService.getFileBackend().updateFileParams(message, mUrl); mXmppConnectionService.updateMessage(message); } diff --git a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java index 099cf354..d861f616 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java @@ -154,11 +154,11 @@ public class HttpUploadConnection implements Downloadable { int code = connection.getResponseCode(); if (code == 200) { Log.d(Config.LOGTAG, "finished uploading file"); - Message.ImageParams params = message.getImageParams(); + Message.FileParams params = message.getFileParams(); if (key != null) { mGetUrl = new URL(mGetUrl.toString() + "#" + CryptoHelper.bytesToHex(key)); } - message.setBody(mGetUrl.toString()+"|"+String.valueOf(params.size)+"|"+String.valueOf(params.width)+"|"+String.valueOf(params.height)); + mXmppConnectionService.getFileBackend().updateFileParams(message, mGetUrl); message.setDownloadable(null); message.setCounterpart(message.getConversation().getJid().toBareJid()); if (message.getEncryption() == Message.ENCRYPTION_DECRYPTED) { |