fix client.api.upload not working
This commit is contained in:
parent
3975bcaea5
commit
f872d19692
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue