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

skonsoft
  • 1,786
  • 5
  • 22
  • 43

3 Answers3

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
Geert Wille
  • 1,656
  • 13
  • 18
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

ibasaw
  • 493
  • 1
  • 7
  • 22
0

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

Assil
  • 343
  • 2
  • 10