Try a different method than putFile() to save your file.
putFile()
I use putData() like this:
putData()
await imageFile.readAsBytes().then((value) async { await storageRef.putData(value, SettableMetadata(contentType: fichierEnCours.mimeType)); });