How to restrict user to create only certain number of document in a collection
- 0
- Users
- Flutter
- Tools
- Accounts
How we can restrict user to upload only certain number of document in a collection
Same as any other validation: use an Appwrite Function to do validation before creating/updating
is there is any other option?
except this
Nope. Functions are the way to go for any sort of custom behavior
example if you can provide, for how to restrict via function
The idea is instead of using the create document API, you would force users to execute a function. The function can do validation and only create the document if validation passes
yes you are right, but how do i know that how many documents is created previously or how will i count the document
You'll need a way to query for it using the list documents API
Recommended threads
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...