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
- Failed to load data from database
My app broken, it throw AppwriteException exception. Few days ago it works well. AppwriteException: , ClientException with SocketException: Failed host lookup:...
- AI feature by functions?
I'm creating a website where, in short, users can index certain genealogical content. In connection with the development of AI, I was thinking about introducing...
- 500 Internal Error when Project is opene...
After migrating from 1.6.1 to 1.7.4 I noticed this strange behaviour: When I open a project in a separate tab I get a 500 internal error. However, then I simpl...