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

[eluser]Unknown[/eluser]
When i upload file on chrome...upload ok , but i upload file on firefox , upload error , the message displays "The filetype you are attempting to upload is not allowed."
.when i check file type by code at system/libraries/Upload.php line 199:
Code:
$this->_file_mime_type($_FILES[$field]); var_dump($this->file_type); die();
Chrome display : string(24) "application/octet-stream"
Firefox display :string(24) "application/java-archive"
Why ? Help me please !
#2

[eluser]LuckyFella73[/eluser]
It because diffenrent browsers treat mime-types different
sometimes.
What you can do is extend the mimes.php in "application/config/".
Just add the mimetype your chrome is detecting to the one allready
defined.




Theme © iAndrew 2016 - Forum software by © MyBB