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
- 403 The current user has been blocked.
Hello, I have a free plan; I've tried to access my project and I get the message "403 The current user has been blocked." I have database, sites, and auth in us...
- [Bug?] row_already_exists (409) after ma...
Hi, I'm experiencing a confusing issue with Appwrite Cloud Setup: A `tournaments` table with a composite UNIQUE index on (tournament_name, date). Steps to rep...
- Am getting "The current user has been bl...
Was working on my app FLUTTER WEB APP, and suddenly, I have been blocked.... What can I do ? When I try to sign in to the console, I get "The current user has ...