Merge branch 'upload-fix-filenames' into 'master'

[Upload] Make all file names lower case

See merge request famedly/famedlysdk!106
This commit is contained in:
Christian Pauly 2019-10-23 15:53:00 +00:00
commit 9812d0b0e1

View file

@ -292,7 +292,7 @@ class Connection {
dynamic fileBytes; dynamic fileBytes;
if (client.homeserver != "https://fakeServer.notExisting") if (client.homeserver != "https://fakeServer.notExisting")
fileBytes = file.bytes; fileBytes = file.bytes;
String fileName = file.path.split("/").last; String fileName = file.path.split("/").last.toLowerCase();
String mimeType = mime(file.path); String mimeType = mime(file.path);
print("[UPLOADING] $fileName, type: $mimeType, size: ${fileBytes?.length}"); print("[UPLOADING] $fileName, type: $mimeType, size: ${fileBytes?.length}");
final dynamic resp = await jsonRequest( final dynamic resp = await jsonRequest(