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
- Is Quick Start for function creation wor...
I am trying to create a Node.js function using the Quick Start feature. It fails and tells me that it could not locate the package.json file. Isn't Quick Start ...
- Redirect URL sends HTTP instead of HTTPS...
I am not sure since when this issue is present, but my Google and Apple redirect URI are no longer pointing to the HTTPS redirect URI when I try to use OAuth. ...
- appwrite cli alpine os
the appwrite cli does not work on alpine os if you install it using the recommended bash script. Maybe there is the possibility to compile it for alpine using t...
