• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Upload chm file using codeigniter

#1
Hi, 

I am trying to upload a .chm file using codeigniter 'do_upload' functionality. But it cannot upload a .chm file.
Would you please suggest me how to upload a .chm file using codeigniter. 

I can upload txt, doc, pdf without any hesitation but cannot upload a .chm file with the same method.

Thanks
Reply

#2
Try adding chm mime type to application/config/mimes.php
Simpler is always better
Reply

#3
(07-31-2017, 11:44 AM)hamid Wrote: Hi, 

I am trying to upload a .chm file using codeigniter 'do_upload' functionality. But it cannot upload a .chm file.
Would you please suggest me how to upload a .chm file using codeigniter. 

I can upload txt, doc, pdf without any hesitation but cannot upload a .chm file with the same method.

Thanks

application/vnd.ms-htmlhelp

https://en.wikipedia.org/wiki/Microsoft_..._HTML_Help

https://github.com/bcit-ci/CodeIgniter/b.../mimes.php <- add
'chm' => 'application/vnd.ms-htmlhelp' to the array
Reply

#4
Hi,

I have added the below lines in mimes.php file
'chm' => 'application/vnd.ms-htmlhelp',
and its (' $config['allowed_types'] = "chm|gif|jpg|jpeg|png|pdf|doc|docx|txt";') my allowable file type.
But still now I cannot upload .chm file and application show the error message 'The filetype you are attempting to upload is not allowed.'

Thanks
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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