fix(ui): temp file path on Windows
This commit is contained in:
+4
-1
@@ -123,7 +123,10 @@ class StreamAttachmentHandler extends StreamAttachmentHandlerBase {
|
||||
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
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);
|
||||
|
||||
final attachmentFileBytes = attachmentFile.bytes;
|
||||
|
||||
Reference in New Issue
Block a user