Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

433
Views
Firebase RTDB Security Rules limit overall size of user data?

I'm looking to find a way to limit the amount of data a user can upload to their portion of my firebase database. I mentioned security rules as this would seem to be the easiest and safest way to implement but I'm open to any suggestions.

Lets say for example I have a firebase rtdb structured like the example below and I want to limit the overall amount of data in each 'User' branch. I'm not trying to limit how much they write on any given upload, just overall how much they have stored total. The app itself is a web app with html, js and css.

root-
    - User1 //security rule to detect/set a max data limit for all User1 data
          - Data: Some values
          - Data2: Something else
          //and so on

I looked for any similar questions but could not find anything relating to this particular need. If anyone has a link to documentation, article or solution I'm happy to do the reading!

Thanks in advance

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Firebase security rules cannot be used to limit size of a node. You can write data through a Cloud function that roughly calculates size of data being added (packages like object-sizeof might be useful) and then stores the size somewhere in the database. You can then later check for the size before updating/adding data to that node.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!