fix client.api.upload not working

This commit is contained in:
Sorunome 2020-06-05 17:20:18 +00:00
parent 3975bcaea5
commit f872d19692

View file

@ -1326,7 +1326,7 @@ class MatrixApi {
headers['Content-Type'] = contentType ?? mime(fileName);
fileName = Uri.encodeQueryComponent(fileName);
final url =
'$homeserver.toString()/_matrix/media/r0/upload?filename=$fileName';
'${homeserver.toString()}/_matrix/media/r0/upload?filename=$fileName';
final streamedRequest = http.StreamedRequest('POST', Uri.parse(url))
..headers.addAll(headers);
streamedRequest.contentLength = await file.length;