CodeIgniter Forums
Can't upload an m4v - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Can't upload an m4v (/showthread.php?tid=42813)



Can't upload an m4v - El Forum - 06-20-2011

[eluser]Kyle Ellman[/eluser]
I'm using the file upload library to upload movie files. I can do just about any file type, but can't seem to get an m4v to work. I even set the only allowed upload type to m4v, and the upload error still says that the chosen file is not allowed.

I'm really confused. Any help out there?


Can't upload an m4v - El Forum - 06-20-2011

[eluser]Nick_MyShuitings[/eluser]
Have you done some var_dumps to see what the mime type of that file shows up as, and then make sure that mime type is in your config file?


Can't upload an m4v - El Forum - 06-20-2011

[eluser]Kyle Ellman[/eluser]
Which config file? I know which filetypes I'm allowing...


Can't upload an m4v - El Forum - 06-20-2011

[eluser]InsiteFX[/eluser]
application/config/mimes.php
Code:
'm4v' => 'video/x-m4v',

.htaccess file
Code:
AddType video/x-m4v m4v
AddType audio/x-m4a m4a
AddType video/mp4 mp4

InsiteFX


Can't upload an m4v - El Forum - 06-20-2011

[eluser]Kyle Ellman[/eluser]
Thanks. That fixed it.