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
- 503 Timeout when Updating or Upserting D...
Hey I’m running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: { "name": "upload-whitelist", "type"...
- Sites 30MB limit from GitHub
I’m deploying a site from github as Other type on the Hobby plan. It is actually a Flutter web app but it’s in a subdirectory with the root being an html landin...
