
Hey, I'm developping a Flutter web app and I used the Storage service to upload files (pdf, jpg, png). I am having troubles to download these files because the documentation example is probably designed for mobile Flutter apps. After a bit of research I am implementing the file download with a method executing this code : (with 'dart:html' as html)
html.window.open('http://localhost/v1/storage/buckets/$BUCKET_ID/files/$FILE_ID/download?project=$APPWRITE_PROJECT_CUSTOM_ID&mode=admin', "Download");
I have the feeling that it is not the recommended and safest way of doing it, but I could not find any other one. Could you please tell me how I could properly implement it? Thanks in advance,

Btw, you shouldn't use mode=admin in your app.
It seems flutter web is hacky in general. You can do it the way you've done or you can call the download method using the SDK and then do something like this: https://stackoverflow.com/questions/65431345/flutter-web-download-file-from-url-instead-of-opening-it
Recommended threads
- Hi im using vvs studio to make a charact...
my game involves magic , leveling up aka "phase" max phase is 30 each 10 20 30 theres awakening 1 2 3 i want to make a character builder so that players can fig...
- Limit File Upload count?
Is there a way to limit the number of files a user can upload? I know there's a limit of file size but in my case I'd like to limit the user to only upload x am...
- Google OAuth2 Login Gets Stuck in Redire...
I'm facing an issue with the Google OAuth2 login flow on my Flutter Android app using the Appwrite SDK. After a successful sign-in with Google, the browser ente...
