Merge pull request #1730 from GetStream/fix/attachment-file-name
This commit is contained in:
@@ -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,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user