Reputation: 700
According to Firestore, the max document size is 1MiB. In my app, every user has his own document. So can every user have a maximum storage size from 1 MiB or do I understand this wrong?
Because in my app the user can input a lot of data, so I fear that the Storage is not enough. How to handle this problem?
Upvotes: 0
Views: 665
Reputation: 138814
So can every user have a maximum storage size from 1MiB or do I understand this wrong?
Yes, that's correct. You are limited to 1 MiB for each document.
Because in my App the user can input a lot of data, so I fear that the Storage is not enough
If you are afraid of reaching the limit, then you should consider storing the data in other collections as well. In your case, I would create a collection of "plans" as well as one of "todos". In this way, you aren't limited in the number of documents you can add to a collection.
How to handle this problem?
For Android, there is a library called FirestoreDocument-Android, which will help you check against the maximum of 1 MiB (1,048,576 bytes) quota.
Upvotes: 1