• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inaccurate mime type detection in file uploading class

#1
[eluser]aL3xa[/eluser]
I'm having hard times making file uploading class working as I want. First I found a problem with allowed_types config option, and luckily, I found a workaround here. However, if I head over to mimes.php and add custom file extension, such as 'fwf' (stands for fixed width format, which is just a plain textual file) and add 'text/plain' as it's mime type, upon upload I get 'application/octet-stream' in response array field ('file_type').

It's quite certain that I'll need to tweak some functions in upload class. Is there any chance that I can bypass CI mime check and use PECL Fileinfo extension instead? Any suggestions about how to do it properly?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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