Image Cropper + S2.3.3
This is an open discussion with 3 replies, filed under Extensions.
Search
I think you'll need to get the 'destination' field from the 'symfieldsupload' in the db.
Not sure how to retrieve that other than building an SQL query.
There is '$this->get('destination') in the upload field which has resulted in grabbing the path of the upload field.
Thanks Andrew!
I think the only way is with SQL Query...
Here what work:
$related_field_type = Symphony::Database()->fetch("SELECT type FROM `sym_fields` WHERE id = " . $related_field_id); $related_field_type = $related_field_type[0]['type']; $related_destination = Symphony::Database()->fetch("SELECT destination FROM `sym_fields_" . $related_field_type . "` WHERE field_id = " . $related_field_id); $related_destination = str_replace("/workspace", "", $related_destination[0]['destination']);
First time at this development level in Symphony, if there are better ways to do this, I accept suggestions. =]
Changes available here https://github.com/germchaos/imagecropper.
Create an account or sign in to comment.
Hi! I'm using the Image Cropper extension and making some tests with Symphony 2.3.3 in the Integration branch.
This issue Upload Field: File Paths is about saving files without file path, and this breaks the extension Image Cropper.
Can anyone help me fix this? I just need to get the file path with a given field ID. Is this possible?