From b2c9ffe77d0a0fa52223d51ee598b353e5e7f6f1 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Thu, 7 Sep 2023 18:49:33 +0530 Subject: [PATCH] fix(llc): fix not able to upload attachmentFile without name. Signed-off-by: Sahil Kumar --- packages/stream_chat/lib/src/core/models/attachment_file.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/stream_chat/lib/src/core/models/attachment_file.dart b/packages/stream_chat/lib/src/core/models/attachment_file.dart index ee6690ca..73a428ea 100644 --- a/packages/stream_chat/lib/src/core/models/attachment_file.dart +++ b/packages/stream_chat/lib/src/core/models/attachment_file.dart @@ -74,13 +74,13 @@ class AttachmentFile { if (CurrentPlatform.isWeb) { multiPartFile = MultipartFile.fromBytes( bytes!, - filename: name, + filename: name ?? 'file', contentType: mimeType, ); } else { multiPartFile = await MultipartFile.fromFile( path!, - filename: name, + filename: name ?? 'file', contentType: mimeType, ); }