0
votes

I have read that firestore charges you when evaluating the rules of the database...

You are charged for reads that are necessary to evaluate your Cloud Firestore Security Rules.

For example, if your rules refer to three documents, but Cloud Firestore only has to read two of those documents to evaluate your rules, you will be charged for two additional reads for the dependent documents.

You are only charged one read per dependent document even if your rules refer to that document more than once.

https://firebase.google.com/docs/firestore/pricing

Is there a similar thing with the firebase storage rules... e.g. If i do the following

resource.size > 0 && resource.size < (2 * 1024 * 1024) && resource.contentType == "image/jpg" 

OR checking metadata

resource.metadata['someMetaDataIset'] == "something"

Will i be being charged for something? I cannot find anything about it on the docs.

1

1 Answers

1
votes

firebaser here

There is no charge for the examples you give for Firebase security rules for Cloud Storage. The metadata (size, contentType metadata and other properties) for the current file is passed to your security rules automatically, and don't require additional lookups.