1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-18 05:42:00 +03:00

Add uploadContent method

This commit is contained in:
David Baker
2015-07-08 14:33:46 +01:00
parent e2768ceba2
commit 639522f80d
2 changed files with 68 additions and 1 deletions

View File

@@ -462,6 +462,16 @@ MatrixClient.prototype.sendHtmlMessage = function(roomId, body, htmlBody, callba
return this.sendMessage(roomId, content, callback);
};
/**
* @param {File} file object
* @param {module:client.callback} callback Optional.
* @return {module:client.Promise} Resolves: TODO
* @return {module:http-api.MatrixError} Rejects: with an error response.
*/
MatrixClient.prototype.uploadContent = function(file, callback) {
return this._http.uploadContent(file, callback);
};
/**
* @param {string} roomId
* @param {boolean} isTyping