CodeIgniter Forums
Problems uploading mov files - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Problems uploading mov files (/showthread.php?tid=37935)



Problems uploading mov files - El Forum - 01-25-2011

[eluser]Unknown[/eluser]
when I try to upload mov files using the uploader class I get the error: "The filetype you are attempting to upload is not allowed."

Jpg and swf files upload ok.

I have included mov in my uploader config:

$config['allowed_types'] = 'gif|jpg|png|swf|mov';

And the mimes.php file has:

'mov' => 'video/quicktime',

I've also tried looking at the file data:

file_name: sample.mov
file_type: video/quicktime
raw_name: sample
orig_name:
file_ext: .mov

I'd be very grateful if anyone can help!

Thanks


Problems uploading mov files - El Forum - 01-25-2011

[eluser]Cristian Gilè[/eluser]
Do you rename the uploaded file? If you set

Code:
$config['file_name']

make sure that the extension provided is also an allowed file type. For example:

Code:
$config['file_name'] = 'new_name.mov';



Cristian Gilè


Problems uploading mov files - El Forum - 01-25-2011

[eluser]InsiteFX[/eluser]
You can also try adding this line to your .htaccess file.

Code:
AddType video/quicktime .qt .mov

InsiteFX


Problems uploading mov files - El Forum - 01-26-2011

[eluser]Unknown[/eluser]
Thanks for your help. I'm not renaming the files and I've tried changing the .htaccess file but it still doesn't work.

I set up a basic uploader just using php and that works but I would rather use the CI uploader.