fix mime type

This commit is contained in:
Salvatore Giordano
2020-10-29 09:49:22 +01:00
parent 65c5fc9d4f
commit dcff11e188
+2 -2
View File
@@ -814,7 +814,7 @@ class MessageInputState extends State<MessageInput> {
}
Future<String> _uploadImage(PlatformFile file, Channel channel) async {
final filename = file.name;
final filename = file.name ?? file.path?.split('/')?.last;
final bytes = file.bytes;
final res = await channel.sendImage(
MultipartFile.fromBytes(
@@ -827,7 +827,7 @@ class MessageInputState extends State<MessageInput> {
}
Future<String> _uploadFile(PlatformFile file, Channel channel) async {
final filename = file.name;
final filename = file.name ?? file.path?.split('/')?.last;
final bytes = file.bytes;
final res = await channel.sendFile(
MultipartFile.fromBytes(