SonataMediaBundle: The file "" does not exist 500 Internal Server Error - FileNotFoundException
Asked Answered
T

3

2

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

Tella answered 5/9, 2012 at 21:9 Comment(0)
G
8

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
Glee answered 3/3, 2014 at 15:35 Comment(0)
C
0

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

Cannibalism answered 28/11, 2012 at 16:36 Comment(0)
Q
0

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

Quad answered 16/4, 2018 at 10:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.