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
- flutter realtime not working since versi...
I have the problem, that in flutter the realtime does not work anymore when I upgrade the sdk to verison 21.0.0+ (works with 20.3.3) I think the queries are not...
- Google's "Choose an account" screen stuc...
I've been struggling with this problem on my servers (self hosted 1.6.0 & 1.7.4) , multiple projects , multiple apps , and I think I have reached a very strange...
- Fix Android OAuth2 page not being resume...
I've opened a PR a while back that fixes Flutter OAuth2 authentication with recent `flutter_web_auth_2` version, that didn't get much attention: * https://githu...