Upload file without validation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Upload file without validation (/showthread.php?tid=22160) |
Upload file without validation - El Forum - 08-31-2009 [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. Upload file without validation - El Forum - 08-31-2009 [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? Upload file without validation - El Forum - 08-31-2009 [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 Upload file without validation - El Forum - 08-31-2009 [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/ |