如何检索文件ComuImage Symfony 3.4的原始名称

时间:2018-10-15 18:29:16

标签: php

我使用comurimage下载图像。 我的问题是我无法获得原始文件名。

"Authorization": "Bearer " + localStorage.getItem('token')

控制器:      $ file = $ project-> getLogo(); // var_dump($ file);                 $ file_name = substr($ file,8,strlen($ file));

->add('logo', CroppableImageType::class, array('label' => 'image', 'required' => false,
                'uploadConfig' => array(
                    'uploadUrl' => $myEntity->getUploadDir(), // required - see explanation below (you can also put just a dir path)
                    'webDir' => $myEntity->getUploadRootDir(), // required - see explanation below (you can also put just a dir path)
                    'fileExt' => '*.jpg;*.gif;*.png;*.jpeg', // required - see explanation below (you can also put just a dir path)
                    'showLibrary' => false,
                ),
                'cropConfig' => array(
                    'minWidth' => 380,
                    'minHeight' => 300,
                    'aspectRatio' => true, //optional
                    'cropRoute' => 'comur_api_crop', //optional
                    'forceResize' => false, //optional
                    'thumbs' => array(//optional
                        array(
                            'maxWidth' => 588,
                            'maxHeight' => 400,
                        //optional
                        )
    ))));

0 个答案:

没有答案