Feature Highlight: Limit File Size

07/06/2017 Posted by Odalis

You’ve got a form where users can upload files from their computers or smartphones. But you’ve noticed that many of the uploaded files are huge and taking 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. So 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 the form submitting, the user received a message letting them know they need to upload a smaller file.

How to Limit a File’s Size

Here’s how you can prevent users from uploading large files using a Validation Rule:

1. In the Data section of the builder, select the object that contains the file field whose size you want to limit. If the file field doesn’t already exist, create a new one.

2. Click on the gear icon of the file field to open the editor.

3. Go to the Validation Rules section and check the “Add field validation rules” box:

4. 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.