Welcome Guest, Not a member yet? Register   Sign In
Disallowed filetypes?
#1

[eluser]Unknown[/eluser]
Hi, is there any WORKING solution for disallow some file types with the MY_Upload library extension?
I need to allow ANY file type for the upload, except: php,asp,js and other scripts. How can I do that?

Found this thread: http://ellislab.com/forums/viewthread/50889/
But it does not work. I've got an "disallowed_types - undefined variable" error. I tried to put entire disallowed_types array directly to the in_array() check, but in this way answer is always "not in array" ant I don't understand why.
#2

[eluser]gstjohn[/eluser]
This post is obviously quite old, but I figured I would post my solution here in case others came across it. This is an extended version of the existing Upload library in CodeIgniter 1.7.1 to allow you to set the types of files you wish to disallow OR allow depending on your needs. Hope this will be a help to someone.

Setting disallowed file upload types with CodeIgniter




Theme © iAndrew 2016 - Forum software by © MyBB