SonataMediaBundle: The file “” does not exist 500 Internal Server Error - FileNotFoundException

。_饼干妹妹 提交于 2019-12-11 03:08:13

问题


I uploaded some files using the SonataMediaBundle but when i wanted to add another, i got that error.

Have you any idea ?

this is the stack error:

in /var/www/znata.com/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php at line 107  -+

        public function guess($path)
        {
            if (!is_file($path)) {
                throw new FileNotFoundException($path);
            }
            if (!is_readable($path)) {

Thanks


回答1:


Probably caused because your php.ini settings has a max uploaded size set.

Change this to a higher value in your php.ini

upload_max_filesize = 2M



回答2:


he can't found the file if (!is_file($path)) { throw new FileNotFoundException($path); }

i think you must to reinstanciate the file for the second one




回答3:


You might face a similar error if you're form doesn't have the attribute: enctype="multipart/form-data"



来源:https://stackoverflow.com/questions/12289859/sonatamediabundle-the-file-does-not-exist-500-internal-server-error-fileno

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!