1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Make the promises be q promises

This commit is contained in:
Mark Haines
2016-11-08 16:26:25 +00:00
parent 93ddb5539e
commit c838164f40
2 changed files with 11 additions and 12 deletions

View File

@@ -53,7 +53,7 @@ function readBlobAsDataUri(file) {
export function decryptFile(file) {
const url = MatrixClientPeg.get().mxcUrlToHttp(file.url);
// Download the encrypted file as an array buffer.
return fetch(url).then(function(response) {
return q(fetch(url)).then(function(response) {
return response.arrayBuffer();
}).then(function(responseData) {
// Decrypt the array buffer using the information taken from