I'm trying to download a file in my flutter app using the Dio plugin. The downloaded file appears in the download folder on my phone but I can't open it. it doesn't have a mime type. It's the same for every mime type (jpg, pdf, etc...) [...
Future<String> downloadFile() async { String dirPath = (await getExternalStorageDirectory()).path; Directory dir = Directory(dirPath); if (!await dir.exists()) { await dir.create(); } String taskId = await FlutterDownloader.enqueue( fileName: 'vimeo_video.mp4', url: 'https://player....
static Future<void> requestDownload( String _url, String _name, String localPath) async { final savedDir = Directory(localPath); await savedDir.create(recursive: true).then((value) async { String? _taskid = await FlutterDownloader.enqueue( url: _url, fileName: _name, savedDir: localPath...
FlutterDownloader.enqueue( url: 'YOUR_URL', savedDir: 'YOUR_PATH', saveInPublicStorage: true, showNotification: true); This problem occurs when the file already exists 👍6 👍 AyumiSashitanimentioned this issueApr 15, 2022 veInPublicStorage: true, ...
W/System.err: at java.io.FileOutputStream.(FileOutputStream.java:238) W/System.err: at java.io.FileOutputStream.(FileOutputStream.java:151) W/System.err: at vn.hunghd.flutterdownloader.DownloadWorker.downloadFile(DownloadWorker.java:244) ...