Merge pull request #1730 from GetStream/fix/attachment-file-name

This commit is contained in:
Sahil Kumar
2023-09-07 19:08:58 +05:30
committed by GitHub
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -4,6 +4,8 @@
- [[#1716]](https://github.com/GetStream/stream-chat-flutter/issues/1716) Fixed client not able to - [[#1716]](https://github.com/GetStream/stream-chat-flutter/issues/1716) Fixed client not able to
update message with `type: reply`. update message with `type: reply`.
- [[#1724]](https://github.com/GetStream/stream-chat-flutter/issues/1724) Fixed sendFile error
on `AttachmentFile` with `bytes` and no `name`.
## 6.8.0 ## 6.8.0
@@ -74,13 +74,13 @@ class AttachmentFile {
if (CurrentPlatform.isWeb) { if (CurrentPlatform.isWeb) {
multiPartFile = MultipartFile.fromBytes( multiPartFile = MultipartFile.fromBytes(
bytes!, bytes!,
filename: name, filename: name ?? 'file',
contentType: mimeType, contentType: mimeType,
); );
} else { } else {
multiPartFile = await MultipartFile.fromFile( multiPartFile = await MultipartFile.fromFile(
path!, path!,
filename: name, filename: name ?? 'file',
contentType: mimeType, contentType: mimeType,
); );
} }