1

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.

1 Answer 1

1

I understand that you are looking for a way to determine what used the bandwidth in your Firebase Storage causing it to go over the quota.

Firebase logs all requests to storage as per link. You can monitor the Cloud Storage activity for your Firebase project by following the link. Log events provide insight on what is happening in your app, such as user actions, system events, or errors. So, after you have configured the FirebaseApp instance, you need to log this in your application by following a process similar to the example mentioned here. This would allow you to record details of when a request is made, the size of the data transfer, and how often it occurred.

Apart from this, you can also open a support request or billing query to Google, where you can ask for a more detailed breakdown of the usage. You may also refer to the link for details on pricing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.