简体   繁体   中英

When accessing files in Firebase Cloud Storage from a client, is it more cost effective to fetch a file using a downloadURL vs getBlob?

In my web application which uses Firebase v9:

Specific to downloading files from a firebase cloud storage bucket client side, I am concerned about cost and quotas.

Which method is the most cost effective?

  1. use getBlob() to download a file.

  2. use getDownloadURL() to obtain a download url and subsequently fetch the file.

Looking at the documentation Firebase provides surrounding quotas it is not clear.

Are the quotas which are associated with calls to getBlob() more restrictive than using getDownloadURL() along with a subsequent http request to download the file?

No, you'll still be charged for bandwidth same way as the downloadURL . There's a security benefit however, anyone with the downloadURL could see and download the image. But you can use getBlob() if you don't want to return a URL but download the file itself (protected by security rules). This way a user cannot share any downloadURL .

Checkout this Firebase Release Notes video where this is explained in detail.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM