Welcome Guest, Not a member yet? Register   Sign In
Uploadify + CI / Experience?
#6

[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


Messages In This Thread
Uploadify + CI / Experience? - by El Forum - 03-15-2009, 08:17 AM
Uploadify + CI / Experience? - by El Forum - 03-15-2009, 08:34 AM
Uploadify + CI / Experience? - by El Forum - 03-15-2009, 08:53 AM
Uploadify + CI / Experience? - by El Forum - 03-23-2009, 07:44 AM
Uploadify + CI / Experience? - by El Forum - 06-05-2009, 06:09 AM
Uploadify + CI / Experience? - by El Forum - 10-08-2009, 11:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB