Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I've just installed the Jcrop Form Element module to try and add jcrop on an image in a custom module form. After playing around with it for a while, however, I've noticed that you can change the location of the main image, but the cropped image always seems to end up in sites/default/files, couldn't find anything in the readme about another option that I missed, so submitting this.
Comments
Comment #1
jhyrith CreditAttribution: jhyrith commentedI'm using the temporary fix of changing line 205
to
at the moment, a better solution would be appreciated!
Comment #2
jhyrith CreditAttribution: jhyrith commentedI've looked into making a better fix for this now, if you change line 205 in the jcrop_fapi.module to:
$file_to_edit = file_copy($src, $element['#jcrop_settings']['cropped_upload_location'], $replace = FILE_EXISTS_RENAME);
and add:
'cropped_upload_location' => 'public://'
to the '#jcrop_settings' array at line 29 you can then use
$settings['cropped_upload_location'] = 'public://custom_location/';
in your defined '#jcrop_settings' array to customize the upload location of your cropped images in your custom forms without restricting it so much as my quick fix.Would be a great addition to the next version :)
Thanks
Comment #3
jhyrith CreditAttribution: jhyrith commentedComment #5
adci_contributor CreditAttribution: adci_contributor at ADCI Solutions commented