[eluser]Mousa[/eluser]
Hi guys, i know whats the problem. the problem is the file type which flash set it as “application/octet-stream”, so what this means? we should know the process of CI Upload Class to Upload a file. CI Upload Class validate file type, through extension of the file and its mime. if you take a look at CI/application/config/mimes.php, so you can see CI`s mime refrence to validate file types.
so, whats the solutions?
1- (simplest one) open CI/system/libraries/Upload.php and go to line 552, then replace this method :
Code:
function is_allowed_filetype()
{
return true;
}
or you can override this method with MY_Upload class. its your choice.
2- add “application/octet-stream” to the type of files you want to upload
open CI/application/config/mimes.php and add the “application/octet-stream” to files you want.
3- change the flash file to send the appropriate file type.
so , the problem is not CI, the Problem is not CI clean urls, or the limitations of get requests. i think this way is better than using external scripts and break ci process, so you can upload files with ci approach,validate users and process images.
good luck