_AssertionError ('package:firebase_storage/src/reference.dart': Failed assertion: line 127 pos 12: 'file.absolute.existsSync()': is not true.) #8076
Replies: 6 comments
-
Future uploadImage(imagefile) async {
} |
Beta Was this translation helpful? Give feedback.
-
Any of you got the solution |
Beta Was this translation helpful? Give feedback.
-
did any one get the solution for this error? Because I'm facing the same problem |
Beta Was this translation helpful? Give feedback.
-
is any one solved this error |
Beta Was this translation helpful? Give feedback.
-
just make sure the file parameter exists, as it cannot be empty. you can add a check like the following
|
Beta Was this translation helpful? Give feedback.
-
Remove the app and restart it.
|
Beta Was this translation helpful? Give feedback.
-
this is error = _AssertionError ('package:firebase_storage/src/reference.dart': Failed assertion: line 127 pos 12: 'file.absolute.existsSync()': is not true.)
Directory appDocDir = await getApplicationDocumentsDirectory();
String appDocPath = appDocDir.path;
File file = File(appDocPath);
await FirebaseStorage.instance.ref('uploads/File_file-to-upload').putFile(file!);
i can't upload files to firestorage
the error is in the putFile(file!) section
Beta Was this translation helpful? Give feedback.
All reactions