Welcome Guest, Not a member yet? Register   Sign In
Upload file without validation
#1

[eluser]dine[/eluser]
Hi all

I want to upload file but without applying the validation of allowed_type.
if I removed code line
$Uploadconfig['allowed_types'] = 'doc|rtf|docx|pdf|odt';

it gives error like you have not mentioned allowed type.

and If i make it blank like
$Uploadconfig['allowed_types'] = '';

The error comes like file type not allowed.
I am not sure about error wordings but error comes.

kindly help me.
#2

[eluser]skunkbad[/eluser]
Just do it in raw php, or extend the Upload class if the Upload class doesn't meet your needs. I think one of the main purposes of the Upload class being the way it is is for security. As long as you are doing something to validate the uploaded files, I think you should be ok. What type of file are you trying to upload?
#3

[eluser]dine[/eluser]
yes I know this is for security but even for doc file when i use $Uploadconfig[‘allowed_types’] = ‘doc|rtf|docx|pdf|odt’

The error comes like file type not allowed. but this not happens everytime. it comes very rare.
i am wondoring why it is coming as It is not wrong so I am avoiding all validation to run code smooth. I know it is not good
#4

[eluser]Aken[/eluser]
This seems to be some sort of bug with CodeIgniter's upload class. There's been a lot of questions regarding the Upload class in general. It can be a finicky thing. http://ellislab.com/forums/viewthread/124543/




Theme © iAndrew 2016 - Forum software by © MyBB