5

Is there any way to add Firebase 3 Storage security rules to limit how many files can single authenticated user upload? For example 100 files per user.

Or somehow update Firebase Database file count, once someone uploaded file to Storage and later validate that file count.

Trying to solve problem, how to deal with user ability to upload unlimited data amount to storage.

  • Have you seen [this](http://stackoverflow.com/a/38427527/4625829)? – AL. Oct 12 '16 at 06:34
  • @AL. That answer is for a completely different question in which we set per upload file size limit. Here I am also curious about setting overall upload limit – gonephishing Aug 12 '17 at 15:03
  • This is answered here. Sadly, the best way to do it is to match filenames: https://stackoverflow.com/questions/40513101/setting-limits-on-file-uploads-via-firebase-auth-and-storage-without-server-in-t – sudo May 26 '19 at 22:12

1 Answers1

0

It's not a simple solution, but...

https://medium.com/@felipepastoree/per-user-storage-limit-validation-with-firebase-19ab3341492d

felipepastorelima
  • 947
  • 1
  • 10
  • 23
  • 3
    Correct me if I'm wrong, but that makes you trust the clients, so it's not very secure. – sudo May 26 '19 at 22:16