workaround for a weird error while uploading the image for the first time

This commit is contained in:
Salvatore Giordano
2021-01-18 12:47:30 +01:00
parent 4044e1bcdc
commit afec7122fb
@@ -1029,7 +1029,11 @@ class MessageInputState extends State<MessageInput> {
setState(() {
_attachments.add(attachment);
});
final mediaFile = await medium.originFile;
final mediaFile = await medium.originFile.timeout(
Duration(seconds: 5),
onTimeout: () => medium.originFile,
);
var file = PlatformFile(
path: mediaFile.path,