Forum

Thread tagged as: Question, Problem

Restrictions on file uploads

Hi there

I have noticed one of my clients has uploaded really large files, such as 40MB PDFs.

To restrict the maximum file size they can upload, is this something I can do on Perch or would it be a server related thing on my host?

Many thanks

Rich

Rich Hemery

Rich Hemery 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can set PERCH_VERIFY_UPLOADS to enable an extra set of upload validation rules.

https://docs.grabaperch.com/docs/installing-perch/configuration/security/

Thanks Drew.

The example right at the bottom of the page you linked for id="file", would that work with the ckeditor?

Replacing:

<perch:content id="body" type="textarea" label="Article body" html="true" editor="ckeditor" />

with:

<perch:content id="body" type="textarea" label="Article body" html="true" editor="ckeditor" max-file-size="2000000" />

Regards

Rich

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, it's not going to be straightforward with CKEditor.