Skip to content

Override uploadRoute Issue #52

@montu0074i

Description

@montu0074i

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
)
)
)
))
;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions