You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
Bugfix for HTTP upload content when running on node
This commit is contained in:
@@ -188,9 +188,10 @@ module.exports.MatrixHttpApi.prototype = {
|
|||||||
upload.request = this.opts.request({
|
upload.request = this.opts.request({
|
||||||
uri: url,
|
uri: url,
|
||||||
qs: queryParams,
|
qs: queryParams,
|
||||||
method: "POST"
|
method: "POST",
|
||||||
|
headers: {"Content-Type": file.type},
|
||||||
|
body: file.stream
|
||||||
}, requestCallback(defer, callback, this.opts.onlyData));
|
}, requestCallback(defer, callback, this.opts.onlyData));
|
||||||
file.stream.pipe(this.opts.request);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.uploads.push(upload);
|
this.uploads.push(upload);
|
||||||
|
|||||||
Reference in New Issue
Block a user