Welcome Guest, Not a member yet? Register   Sign In
Strange Problem with Video File Upload
#1

[eluser]cyberbuff[/eluser]
Hello All,
I am building a video site on CI (v 2.1.0). The admins can upload videos via admin panel. It works perfectly on my local server. But on remote test server, it's not working here. I have set the mimes.php to recognize the file-type correctly. The allowed file-types are okay. But the error message says the file-type isn't permitted.
Here's my mimes.php:
Code:
...
'mp4'  => 'video/mp4',
'flv'  => 'video/x-flv',
'avi' => 'video/x-msvideo',
'mpeg' => 'video/mpeg',
...
Alowed file-types:
Code:
$upload_config['allowed_types'] = 'flv|mp4|avi|mpeg'
If I do a var_dump for $_FILES it gives me:
Code:
array(1) { ["video_file"]=> array(5) { ["name"]=> string(48) "test_video_file.mp4" ["type"]=> string(9) "video/mp4" ["tmp_name"]=> string(14) "/tmp/phpwkOICI" ["error"]=> int(0) ["size"]=> int(5668643) } }
What is wrong with it? What drives me nuts is that the same script works fine on my local machine but doesn't work on remote test sub-domain. And every debug message looks legit to me. Any help is much appreciated.
Thanks and regards,
Abhisek
#2

[eluser]InsiteFX[/eluser]
Hosting providers do not install all the mime types! In your control panel you should be able to add the mime types you need or ask your hosting provider to install them.
#3

[eluser]cyberbuff[/eluser]
Here are the mime-types for the host: http://pastebin.com/AsuZKBZV The allowed file-types are in it, as well.
#4

[eluser]InsiteFX[/eluser]
If I remember right I think tere was a problem in CI 2.1.0 with the mime type. Try downloading and install the newer version from the GitHub and see if it works.

CodeIgniter GitHub




Theme © iAndrew 2016 - Forum software by © MyBB