Back
Uncaught : AppwriteException: , File bytes must be provided for Flutter web (0)
- 0
- Self Hosted
- Flutter
My app works perfectly on android, but I get this error in flutter web.
Code to upload the file:
TypeScript
final result = await storage.createFile(
bucketId: 'PostImages',
fileId: ID.unique(),
file: InputFile.fromPath(path: _image!.path, filename: _image!.name),
);
What I'm ding wrong?
TL;DR
Developers are experiencing an error with their Flutter web app when trying to upload a file using the `storage.createFile` function. The error message is "Uncaught : AppwriteException: File bytes must be provided for Flutter web (0)". They are not experiencing this issue on Android. They have provided the code snippet they are using to upload the file.
Solution: It appears that the `storage.createFile` function requires file bytes to be provided for Flutter web, which is not necessary for Android. To fix this issue, developers should update their code to include the file bytes when calling the function. The `InputFile.fromPath`Recommended threads
- How to use dart workspaces to deploy a f...
Hello, I'm developing a Flutter application and I would like to leverage dart pub workspaces to deploy a function with a dart runtime as advertised here : http...
- Migration from Cloud to Self-Hosted not ...
Hello Appwrite Community, I've got the problem, that when I try to migrate my Appwrite Project from the cloud to my self-hosted Appwrite, that an API Key is mi...
- I can't migrate my project from Appwrite...
I'm having an issue migrating my Appwrite project to a self-hosted instance. The problem is that I've exceeded my read rate limit (or database read limit), so I...