Codeigniter xml file not uploading
I've figured out why this was happening. By default, the MIME type was not set in Codeigniter's mimes.php
config file. I needed to add an array of multiple MIME types for the xml
MIME. Specifically, I needed to add application/xml
.
So in /application/config/mimes.php
I changed this line:
'xml' => 'text/xml',
To this (converting the xml
option to an array):
'xml' => array('text/xml', 'application/xml'),
That fixed the problem right away.
this is the one I use:
'xml' => array('application/xml', 'text/xml', 'text/plain'),
NOTE: paste it in /application/config/mimes.php