Merge pull request #1440 from GetStream/fix/tempFilePathOnWindows

fix(ui): temp file path on Windows
This commit is contained in:
Rafal Adasiewicz
2023-01-26 15:40:26 +01:00
committed by GitHub
2 changed files with 4 additions and 1 deletions
@@ -7,6 +7,7 @@
🐞 Fixed
- [[#1424]](https://github.com/GetStream/stream-chat-flutter/issues/1424) Fixed a render issue when showing messages starting with 4 whitespaces.
- Fixed a bug where the `AttachmentPickerBottomSheet` was not able to identify the mobile browser.
- Fixed uploading files on Windows - fixed temp file path.
## 5.2.0
@@ -123,7 +123,9 @@ class StreamAttachmentHandler extends StreamAttachmentHandlerBase {
final tempDir = await getTemporaryDirectory();
final tempPath = Uri.file(tempDir.path, windows: CurrentPlatform.isWindows);
final tempFilePath = tempPath.resolve(fileName!).path;
final tempFilePath = tempPath
.resolve(fileName!)
.toFilePath(windows: CurrentPlatform.isWindows);
print(tempFilePath);
final attachmentFileBytes = attachmentFile.bytes;