[Client] Remove unused variable in upload

This commit is contained in:
Lukas Lihotzki 2020-02-24 17:06:07 +01:00
parent ec16fa5f28
commit f483fb437e
1 changed files with 1 additions and 2 deletions

View File

@ -875,7 +875,6 @@ class Client {
/// Uploads a file with the name [fileName] as base64 encoded to the server
/// and returns the mxc url as a string.
Future<String> upload(MatrixFile file) async {
dynamic fileBytes;
// For testing
if (this.homeserver.toLowerCase() == "https://fakeserver.notexisting") {
return "mxc://example.com/AQwafuaFswefuhsfAFAgsw";
@ -890,7 +889,7 @@ class Client {
streamedRequest.contentLength = await file.bytes.length;
streamedRequest.sink.add(file.bytes);
streamedRequest.sink.close();
print("[UPLOADING] $fileName, size: ${fileBytes?.length}");
print("[UPLOADING] $fileName");
var streamedResponse = await streamedRequest.send();
Map<String, dynamic> jsonResponse = json.decode(
String.fromCharCodes(await streamedResponse.stream.first),