incrediblezayed / file_saver

A simple flutter plugin for saving files in all platforms
https://pub.dev/packages/file_saver
BSD 3-Clause "New" or "Revised" License
75 stars 92 forks source link

saveFile method return "Something went wrong, please report the issue ..." #98

Closed GuenKainto closed 4 months ago

GuenKainto commented 4 months ago

Hi, i have a bug onConvertImage: (Uint8List imageList) async{ try{ final DateFormat dateFormat = DateFormat('dd_MM_yyyy'); Directory generalDownloadDir = Directory('/storage/emulated/0/Download'); final dir = await getDownloadsDirectory(); log(generalDownloadDir.path); await FileSaver.instance.saveFile( name: '${dateFormat.format(DateTime.now())}_result_image', ext: 'png', mimeType: MimeType.png, bytes: imageList, filePath: generalDownloadDir.path ).then((value){ log(value); }); }catch(e){ log(e.toString()); }

The value return : Something went wrong, please report the issue https://www.github.com/incrediblezayed/file_saver/issues but no exception catched I've tried other folders and it seems the same, i want to save file into cache folder. I use the saveAs function and it works fine I use in Android 11 platform