0

Increase Upload Limit in OpenCart 1.5.x

By 10th February 2015Blog

It’s rather annoying having to tweak the compression of images to get under OpenCarts 300kb limit on images and files. When using PNG files for slides, I’d rather increase the limit than decrease the quality of product images to get them into OpenCart, especially as you cannot simply upload direct into the images folder (due to folder permissions).

So, to increase the limit on the upload, it’s quite simple to do.

Open the file:
admin\controller\common\filemanager.php

and edit this line (roughly around line 436):

if ($this->request->files['image']['size'] > 300000) {
$json['error'] = $this->language->get('error_file_size');
}

You can set the upload in bytes to anything, but I found it useful increasing by another 100kb. For this, I changed 300000 to 400000.

Hope this helps!

Phil

Phil

I'm a Wordpress web developer and website designer based in Cheshire, UK. I specialise in Wordpress, Responsive design and website conversion. | Twitter | Linkedin

Leave a Reply