Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi KK,
Can you please help me with this problem?
I am using secure file databound to allow users upload images from the front-end:
The editable region:
Code: Select all
<cms:repeat '5' startcount='0' >
        <cms:editable name="property_img_<cms:show k_count />"
                      allowed_ext='jpg, jpeg, png, gif'
                      max_size='10000'
                      type='securefile'
                      label='Property images'
                      desc="<cms:add k_count '1' /> Images should be of the dimension - 789.5px by 648px"
                      width='789.5' height='648'
                      quality='80'
                      enforce_max='1'
                      order="100<cms:show k_count />"

                      />
</cms:repeat>


However each time I try to submit the databound form I get this error

The dimensions of image exceed the permitted 2048px X 2048px


What I am doing wrong? Thank you
Hi,

The correct parameters to set are named 'max_width' and 'max_height'. Also, please don't use decimal (e.g. 789.5) as any of those values.

Hope this helps.
Thank you KK. Will this approach allow users to be able to upload images of any dimension?

What I seek to achieve is that, a user can upload images of any dimension but once the page is persisted into the database couch will reduce the dimensions to that specified in the editable region.
A good idea to attach some jQuery to that editable field to autosize to less than 2048px possibly insanely large images. :mrgreen: Shouldn't be a problem with amazing field's customization opportunities.
4 posts Page 1 of 1