1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Bugfix for HTTP upload content when running on node

This commit is contained in:
Paul "LeoNerd" Evans
2016-04-21 14:16:20 +01:00
parent 2c40932080
commit 37ea7edaa0

View File

@@ -188,9 +188,10 @@ module.exports.MatrixHttpApi.prototype = {
upload.request = this.opts.request({
uri: url,
qs: queryParams,
method: "POST"
method: "POST",
headers: {"Content-Type": file.type},
body: file.stream
}, requestCallback(defer, callback, this.opts.onlyData));
file.stream.pipe(this.opts.request);
}
this.uploads.push(upload);