Firefox 5 - Upload allowed_types no longer working properly |
[eluser]Philo01[/eluser]
Hi all, I've just upgraded my Firefox to v5 and now the upload validation is no longer working properly. Code: $config['allowed_types'] = 'html|zip'; When trying to upload a ZIP file I get the following error: "The filetype you are attempting to upload is not allowed." This was working in Firefox 4. I also tried to use Safari and that works like it should. How is this possible? Kind regards, Philo
[eluser]InsiteFX[/eluser]
Maybe you need to add a new user_agent for FireFox 5.
[eluser]danmontgomery[/eluser]
It's possible because the mime type that CI validates against is the one generated by the browser. You can disable allowed_types, use $this->upload->data() to see what mime type CI is getting, and add it to config/mimes.php
[eluser]pmoroom[/eluser]
FF 5.0 sees the type as application/x-download whereas IE/FF 4.x see it as application/x-zip-compressed I fixed it by modifying my mime types in config/mimes.php. 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/x-download','application/download'), There is more information here (although older) https://bugzilla.mozilla.org/show_bug.cgi?id=527992
[eluser]osci[/eluser]
[quote author="pmoroom" date="1308975139"]FF 5.0 sees the type as application/x-download whereas IE/FF 4.x see it as application/x-zip-compressed I fixed it by modifying my mime types in config/mimes.php. 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/x-download','application/download'), There is more information here (although older) https://bugzilla.mozilla.org/show_bug.cgi?id=527992[/quote] I was about to check. thnx for the info. |
Welcome Guest, Not a member yet? Register Sign In |