Welcome Guest, Not a member yet? Register   Sign In
Problems with upload class
#1

[eluser]Clooner[/eluser]
Hi All,

The upload class worked fine for me before but not on my latest project where I am trying to upload an csv file. I keep hitting the following error: The filetype you are attempting to upload is not allowed.

I am using CI 1.6.3 that includes the csv file as mime type and I also set the upload config with $config['allowed_types'] = 'csv'; and I also set enctype="multipart/form-data" in the form header. and last but not least I call the function using if (!$this->upload->do_upload($fieldname))

Hope someone has some suggestions for me to make this work

Thanks,

Jeroen
#2

[eluser]Seppo[/eluser]
Try echoing $_FILES[$fieldname]['type'], then go to config/mimes.php and look for CSV extension and add the type you are getting.
#3

[eluser]Asinox[/eluser]
ok

this?

'flv' => 'video/x-flv'

?




Theme © iAndrew 2016 - Forum software by © MyBB