I am getting this error in flutter project, while uploading the image to firebase.
Error:
[1] W/StorageTask( 5144): unable to change internal state to: INTERNAL_STATE_CANCELED, INTERNAL_STATE_CANCELING isUser: true from state:INTERNAL_STATE_SUCCESS
My code:
uploadImage(mImageFile) async {
storageRef.Reference reference =
storageRef.FirebaseStorage.instance.ref().child("menus");
storageRef.UploadTask uploadTask =
reference.child(uniqueIDName + ".jpg").putFile(mImageFile);
storageRef.TaskSnapshot taskSnapshot = await uploadTask.whenComplete(() {});
String downloadURL = await taskSnapshot.ref.getDownloadURL();
return downloadURL;
}
It should upload the image URL to firebase database
New contributor
Ayush Singh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.