
Hello everyone! I'm planning to have tiered upload functionality on my apps. Pretty much like discord. for an example in free tier you can upload file up to 1MB, but in "premium" tier you can upload up to 10MB. I'm planning to handling those things on client ( I'm using Javascript) by checking user's current plan and check the file size before the upload. What do you think? Is it good? or maybe is there any built in functions in appwrite to limit specific size upload on specific group? thanks!

I'm planning to handling those things on client ( I'm using Javascript) by checking user's current plan and check the file size before the upload
Client side validation is not safe.
What if you different upload buckets. one premium and 1 basic. and a user will only have access to the preimum one if they're in the premium tier.
Then, you have a function that triggers when a file gets uploaded, processes the file, and moves it to a bucket where it can be fetched
The processing can be really helpful to do things like resize, remove metadata, etc

Aah, I see. So selecting which bucket to be used is happening inside the client, right? The premium and non premium can be validated by enroll them to specific group, then let appwrite validate the eligibility of their file upload by setting which group can upload to that specific bucket

and even if the non-premium one tries to upload to the premium bucket, it will fail (server side validation) so they can't try to bypass it

Cool! It would be act as double protection

you mentioned function, is it cloud function? does it mean I need 3 bucket? the upload one and 2 tiered bucket?
Recommended threads
- No access control allow origin -blocked ...
im not sure what exaclty im doing wrong - its my first time using appwrite - and im watching a tutorial about how to create a movie app and followed everything ...
- [SOLVED] Appwriteexception: invalid redi...
I've been following this documentation on my app: https://appwrite.io/docs/tutorials/nextjs-ssr-auth/step-7 On Localhost and local development, it's working fi...
- Appwrite being constantly slow and over-...
As can we can from image we are getting same warnings, and the appwrite is unresponsive. Steps Taken: -Disabled Appwrite stats. Made my app really cache heavy,...
