Forum

Thread tagged as: Question, Problem

Limiting File / Image Size

Hi, is there a simple way to limit the size of a file that an end user could upload?

A site I have currently uses ckeditor and the end users are uploading large files and images that are caning by hosting limits. I've tried telling them but alas... :(

Thanks!

Ian Rock

Ian Rock 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

PHP itself can limit the file size it will accept. Perch can't do that because the file is uploaded before any scripts are invoked.

You can limit the display size of the image from your template.

Thanks Drew, would that be by changing a php_value in the .htaccess file?

Drew McLellan

Drew McLellan 2638 points
Perch Support

If that's how your hosting works, then yes. You should ask your server administrator if you're not sure.