Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
I have a securefile region to upload an image.

It is defined as:
Code: Select all
<cms:editable name="af_document" label="Admission Form" max_width="1000" crop="0" enforce_max="1" type="securefile" allowed_ext='jpg, jpeg, png, gif' quality="70" order="35" />


When I upload a file, I get the following error:
The dimensions of image exceed the permitted 1000px X 2048px


How can i compress the file to get it under 2048px and then upload it?

Regards,
GenXCoders (Priya)
Image
where innovation meets technology
Hi,

Securefile, as you know, is used on the frontend form to allow visitors the facility of uploading their own files/images.

If you, as the admin, have configured the region to allow only images not exceeding a certain dimension then the onus is on the visitor to abide by that restriction i.e. the visitor should resize the image herself before uploading else the upload would be rejected.

The alternative would be to allow images of even larger dimensions to be uploaded (by changing the 'max_width' param of your region).

Hope this helps.
@KK sir,
This helps.
But then i need to set absurd max_width and max_height values. Something like 5000, which is approx 52 inches.

What i was looking to achieve was to be able to compress an image to a particular size before uploading.

I am working with uploading scanned images of documents. So i do not have a specific width or height. Some images are A4, legal, A5, A6 sizes also. But width and height wise they are as big as 3500px.

Can this be achieved using the canvas api in couch? Or is there another way?

Regards,
GenXCoders (Priya)
Image
where innovation meets technology
Out of the box, I am afraid there is nothing offered by Couch for client side manipulation of images.
@KK Sir.

I got it sir. Knew it too.
It would be a great add on for CouchCMS to be used with securefile region for images, I suppose.

Regards,
GenXCoders (Priya)
Image
where innovation meets technology
5 posts Page 1 of 1