fix video upload
This commit is contained in:
@@ -1904,11 +1904,11 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
|
|
||||||
if (file == null) return;
|
if (file == null) return;
|
||||||
|
|
||||||
final mimeType = file.name?.mimeType;
|
final mimeType = file.name?.mimeType ?? file.path.split('/').last.mimeType;
|
||||||
|
|
||||||
final extraDataMap = <String, dynamic>{};
|
final extraDataMap = <String, dynamic>{};
|
||||||
|
|
||||||
if (mimeType.type == 'video' || mimeType.type == 'image') {
|
if (mimeType?.type == 'video' || mimeType?.type == 'image') {
|
||||||
attachmentType = mimeType.type;
|
attachmentType = mimeType.type;
|
||||||
} else {
|
} else {
|
||||||
attachmentType = 'file';
|
attachmentType = 'file';
|
||||||
|
|||||||
Reference in New Issue
Block a user