Seems to me like there is a bug in Symfony.
A ticket has been opened at here.
Ngu Soon Hui
2009-05-13 06:16:27
Seems to me like there is a bug in Symfony.
A ticket has been opened at here.
This is Google Chrome's bug not Symfony. I have the same problem with Google Chrome's ZIP mime.
I have my own application written in php.
When you write echo $_FILES['yournameattr']['type'];
it returns empty string when you upload a zip file but when you upload a gif or jpeg file it returns image/jpeg or image/gif.
I have Google Chrome version 3.0.195.6 (beta).
Though if you need fast solution, you can use preg_match to check the file's extension (zip or not).
if (preg_match('/(.*)\.zip/',$_FILES['yournameattr']['name'])) {echo 'This is zip.';}
As of now MIME/type of a zip file is application/octet-stream in Google Chrome. :)