Merge branch 'soru/fix-client-api-upload' into 'master'

fix client.api.upload not working

See merge request famedly/famedlysdk!338
This commit is contained in:
Christian Pauly 2020-06-09 10:09:46 +00:00
commit ad1175d0ce

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;