CodeIgniter Forums
How to define your own MIME Typ - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: How to define your own MIME Typ (/showthread.php?tid=67955)



How to define your own MIME Typ - SirTom - 05-01-2017

Is it possible to define my own MIME Typ?

I use CodeIgniter’s File Uploading Class. Can I specify my own mime type to control what is allowed to be upload. The Type is *.lpo and this is a customized database, like *.mdb.

Thanks for your help!
Tom


RE: How to define your own MIME Typ - PaulD - 05-01-2017

Do you mean something like this?

PHP Code:
$config['allowed_types'] = 'gif|jpg|lpo'

In the docs in preferences:
https://www.codeigniter.com/user_guide/libraries/file_uploading.html#preferences

There is some other stuff about mime types like mod_mime_fix and detect_mime but have never had need to use or refer to them.

Best wishes,

Paul