You’ve got a form where users can upload files from their computers or smartphones. You’ve noticed that many of the uploaded files are huge and take up a lot of storage space. It would be great if you could limit the size of the files users can upload.
For example, we have a job portal where applicants can apply for jobs and upload their resumes. However, we want to prevent them from uploading resume files that take up too much space. We want to limit them to files that are no bigger than 20MB:
Jenny Martin tried to upload a file that was larger than 20MB. Instead of submitting the form, she received a message letting her know that she needed to upload a smaller file.
It is now possible to resize images on uploading by enabling image resizing in the image field settings.
Select the Table with the File Field
In the Data section of the Builder, select the table that contains the File field in which you would like to limit the size. If the File field doesn't already exist, create a new one.
Open the Field Editor
Click on the more options icon (the "..." icon) and click on the settings to open the editor. Then go to the Validation Rules section.
Add the Validation Rule
Check the “Add field validation rules” box:
For the When part of the rule, select the file field and then the "size is greater than" option. Once that's selected, you'll be able to choose the size limit.
For the Message part of the rule, you can enter the custom message you want the user to see.
Your validation rule is now ready, and your users will automatically be prompted if they try to upload those larger files.
You can read more about adding and managing validation rules here.
It is also possible to resize images upon upload. This setting can be accessed from the settings on the image field in the Data section of the Builder.