Forum

Thread tagged as: Question

Is there a min-file-size attribute on the file field?

I'm after clarification as to whether there is an opposite to the max-file-size attribute shown here:

<perch:content id="file" type="file" accept="pdf,zip" max-file-size="2000000" />

The reason I ask, is because the HR team at my workplace would like to stop people from attaching blank job application forms when applying for jobs online (using Perch Forms). So if I could match the same byte size as the blank form, I can stop people from uploading them when they haven't been filled in properly.

Philip Gwynne

Philip Gwynne 1 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

There isn't, no.

With PHP you could check and pass the PDF as a custom variable to the template instead of using Perch.

Thanks both! I'll attempt it as a custom variable instead.