• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Firefox 5 - Upload allowed_types no longer working properly

#1
[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

#2
[eluser]InsiteFX[/eluser]
Maybe you need to add a new user_agent for FireFox 5.

#3
[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

#4
[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

#5
[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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.