aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/http
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-06-30 17:15:02 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-06-30 17:15:02 +0200
commitaca9d8036c53c0d0689ed94d67d7c5071d74b14e (patch)
treea83e95883ed69fc34fb745345c88ee249b1ed906 /src/main/java/eu/siacs/conversations/http
parent6af97c724cdcc7d94070a99e9035d84373c5eb75 (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.java4
-rw-r--r--src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java4
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) {