Rank 2: Process
How we can restrict user to upload only certain number of document in a collection
Votes
0
Replies
8
Participants
Unknown
Messages
9
Rank 2: Process
How we can restrict user to upload only certain number of document in a collection
Admin
Same as any other validation: use an Appwrite Function to do validation before creating/updating
Rank 2: Process
is there is any other option?
Rank 2: Process
except this
Admin
Nope. Functions are the way to go for any sort of custom behavior
Rank 2: Process
example if you can provide, for how to restrict via function
Admin
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
Rank 2: Process
yes you are right, but how do i know that how many documents is created previously or how will i count the document
Admin
You'll need a way to query for it using the list documents API