fix(ui): temp file path on Windows
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
- [[#1424]](https://github.com/GetStream/stream-chat-flutter/issues/1424) Fixed a render issue when showing messages starting with 4 whitespaces.
|
- [[#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 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
|
## 5.2.0
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -123,7 +123,10 @@ class StreamAttachmentHandler extends StreamAttachmentHandlerBase {
|
|||||||
|
|
||||||
final tempDir = await getTemporaryDirectory();
|
final tempDir = await getTemporaryDirectory();
|
||||||
final tempPath = Uri.file(tempDir.path, windows: CurrentPlatform.isWindows);
|
final tempPath = Uri.file(tempDir.path, windows: CurrentPlatform.isWindows);
|
||||||
final tempFilePath = tempPath.resolve(fileName!).path;
|
var tempFilePath = tempPath.resolve(fileName!).path;
|
||||||
|
if (CurrentPlatform.isWindows && tempFilePath.startsWith('/')) {
|
||||||
|
tempFilePath = tempFilePath.substring(1);
|
||||||
|
}
|
||||||
print(tempFilePath);
|
print(tempFilePath);
|
||||||
|
|
||||||
final attachmentFileBytes = attachmentFile.bytes;
|
final attachmentFileBytes = attachmentFile.bytes;
|
||||||
|
|||||||
Reference in New Issue
Block a user