word 2007 file uploading failed in CI? |
[eluser]Zeeshan Rasool[/eluser]
Hi dear members! i have a problem which is: i cant upload my word2007 file on server as i update my mime.php file but no effect. Please any idea. Very Thanks in advance ! My Code for uploading array: Code: $config['allowed_types'] = 'pdf|gif|jpg|jpeg|png|bmp|doc|docx|word|dotx|docm';
[eluser]Ben Edmunds[/eluser]
What error are you getting? How large is the file? And BTW, happy birthday!
[eluser]Zeeshan Rasool[/eluser]
thanks Ben, actually it doesn't find any file. i put a check if($_FILES["filename"]["size"]) { // Not come here.. } Why it avoid this check .
[eluser]Ben Edmunds[/eluser]
Go ahead and post the whole controller snippet and the view file code.
[eluser]cahva[/eluser]
If I remember correctly, this is an issue how CI checks the mime types. Try to move the doc,docx etc. to the beginning of $config['allowed_types']. This had something to do with checking if the file is a picture and it will fail if its not a picture even if its on the list
[eluser]Craig A Rodway[/eluser]
I also found it useful to add information for MIME types to application/config/mimes.php: Code: ...
[eluser]Zeeshan Rasool[/eluser]
Thank you all ! Actually its my mime file problem im sure because it doesn't detect that any file is in $_FILE @Ben, actually i am doing simple i just uploading a file that is docx file My view code is : Code: <input type="file" name="myfile" id="myfile" style="float:left" size="65" /> Code: function upload_file() @craig A Rodway : i used it my it make no effect. In mime.php code is like: Code: 'doc' => 'application/msword', |
Welcome Guest, Not a member yet? Register Sign In |