-
Notifications
You must be signed in to change notification settings - Fork 72
Description
How can I change uploadRoute to my custom controller?
I have changed uploadRoute to my custom controller but it doesn't work.
$myEntity = $builder->getForm()->getData();
$builder->add('photoName', 'comur_image', array(
'uploadConfig' => array(
'uploadRoute' => 'custom_route', //optional
'uploadUrl' => $myEntity->getUploadRootDir(), // required - see explanation below (you can also put just a dir path)
'webDir' => $myEntity->getUploadDir(), // required - see explanation below (you can also put just a dir path)
'fileExt' => '.jpg;.gif;.png;.jpeg', //optional
'libraryDir' => null, //optional
'libraryRoute' => 'comur_api_image_library', //optional
'showLibrary' => true, //optional
'saveOriginal' => 'photoName' //optional
),
'cropConfig' => array(
'minWidth' => 100,
'minHeight' => 100,
'aspectRatio' => false, //optional
'cropRoute' => 'comur_api_crop', //optional
'forceResize' => true, //optional
'thumbs' => array(//optional
array(
'maxWidth' => 500,
'maxHeight' => 300,
'useAsFieldImage' => true //optional
)
)
)
))
;