I'm testing my app, and analytics say that I used 2 MB/day for the first month of tests. Yesterday I added a function that allowed to upload a video, and in order to test it I uploaded a video (or maybe 2, but surely not more) of less than 10MB of size. Now the problem is that I overflew the allowed bandwidth, using 1.5GB and I don't know why. Should I look at the method where I upload to the storage, or the ones where I download, or both?
This is the only method used to upload a video:
Future<String> uploadVideo(imageFile) async {
UploadTask uploadTask =
storageRef.child("post_$postId.mp4").putFile(imageFile);
TaskSnapshot storageSnap = await uploadTask;
String downloadUrl = await storageSnap.ref.getDownloadURL();
return downloadUrl;
}
While for downloading, since I use Chewie as video player, I have:
Chewie(
controller: ChewieController(
...
videoPlayerController: VideoPlayerController.network(widget.post.mediaUrl)
),
)
I don't know if it could be something else that causes this problem and how to fix it, so if you have any suggestion please tell me.