How to get a Uint8List file with dio? :-/ #2289
sucknorris
started this conversation in
General
Replies: 1 comment
-
Don't understand the code or the question. Can you be more specific and share full example? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
i want to download a file to a users mobile device library with using dio and gal.
Now i have the following code (part of it):
if (permissionRequested) { final hash = math.Random().nextInt(10000); final fileExt = 'png'; final fileName = 'gu_' + '$hash.$fileExt'; final imagePath = '${Directory.systemTemp.path}/' + fileName; await Dio().download(photoURL, imagePath); await Gal.putImage(imagePath, album: albumName); } else { throw Exception('Permission to access gallery denied'); }
But now photoURL iis a string
await Dio().download(photoURL, imagePath);
is there any way to replace it to a Uint8List file?
Beta Was this translation helpful? Give feedback.
All reactions