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
- Attach Dart debugger for locally deploye...
Hello there, I was wondering if it is possible to attach debugger to dart function, that I run locally. It would make development much easier :-). Thank you.
- total parameter not working correctly in...
Hello Appwrite team, I'm experiencing issues with the total parameter in the listRows() method (TablesDB) across multiple SDKs. **Issue 1**: Node.js SDK (node...
- Relationship lists aren't showing
In flutter, when I perform a listRows function for my table which contains various relationships in addition to normal data, I am not getting the relationships ...