Tell us what you are trying to do? Have asked this before with no affirmation. Can Toolset allow developer to impose total upload limits per Access role or Role in general? For example: Role A 100MB, Role B 200MB... or upgrade for more upload storage.
Is there any documentation that you are following? No
Is there a similar example that we can see? This is a standard function of modern subscription/membership models. I cannot figure out how to achieve this with Toolset.
What is the link to your site? Provided in the form site selection. Is this information stricken in the post?
Hi,
Thank you for contacting us and I'd be happy to assist.
This feature is not available out of the box, so implementing an upload limit like this will require a fair amount of customization.
For example, you can add two user custom fields "Total allowed uploads size" and "Total consumed uploads size".
You'll need to make sure that the users can upload the files only through Toolset Forms.
Using the "cred_form_validate" hook, you can include a custom validation function to check the size of the file being uploaded and allow the form submission only if the sum of the "Total consumed uploads size" field value and the currently uploaded file, doesn't exceed the value of the custom field "Total allowed uploads size":
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate
And on successful form submission, you can use the custom function attached to the hook "cred_save_data" to add the new file's size, to the value of the current user's "Total consumed uploads size" field:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
I hope this helps and for more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/
regards,
Waqar