![]() |
Upload library not recognizing allowed file type - 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: Upload library not recognizing allowed file type (/showthread.php?tid=34486) |
Upload library not recognizing allowed file type - El Forum - 09-30-2010 [eluser]GeXus[/eluser] I'm using the upload library to upload some video, I have the following set: Code: $config['allowed_types'] = 'mov|wmv|mpeg|mpg|avi|mpeg4'; I just attempted to upload a valid .wmv file, but received the error "The filetype you are attempting to upload is not allowed." Any ideas? Thanks! Upload library not recognizing allowed file type - El Forum - 10-01-2010 [eluser]Ruh[/eluser] Same here?! Upload library not recognizing allowed file type - El Forum - 10-01-2010 [eluser]mi6crazyheart[/eluser] Can u show u'r controller code plz... Upload library not recognizing allowed file type - El Forum - 10-01-2010 [eluser]danmontgomery[/eluser] You need to add wmv to config/mimes.php: Code: 'wmv' => 'video/x-ms-wmv', (the mime type used is dependent on browser, so you may need to use a different value) Upload library not recognizing allowed file type - El Forum - 10-01-2010 [eluser]Ruh[/eluser] i tried for avi like that. Code: 'avi' => array('video/x-msvideo','video/avi'), but it didn't work. i also tried in .htaccess Code: AddType video/x-flv .flv but it didn't work. Here is the full code: Code: function VideoUpload(){ And here is the error message: Code: Error in Uploading video And the upload data: Code: Array ( [file_name] => 156218057739800_10031.mp4 [file_type] => video/mp4 [file_path] => /home/****/domains/******/public_html/Upload/ [full_path] => /home/******/domains/******/public_html/Upload/156218057739800_10031.mp4 [raw_name] => 156218057739800_10031 [orig_name] => [client_name] => 156218057739800_10031.mp4 [file_ext] => .mp4 [file_size] => 6448977 [is_image] => [image_width] => [image_height] => [image_type] => [image_size_str] => ) Upload library not recognizing allowed file type - El Forum - 10-01-2010 [eluser]danmontgomery[/eluser] Quote:[file_type] => video/mp4 Code: 'avi' => array('video/x-msvideo','video/mp4'), Upload library not recognizing allowed file type - El Forum - 10-01-2010 [eluser]Ruh[/eluser] opss i made a mistake in code which is i posted here.. i wrote like that in mimes.php Code: 'mp4' => array('video/mp4'), but it's still not working :/ i'll try to install fresh copy. Upload library not recognizing allowed file type - El Forum - 10-01-2010 [eluser]danmontgomery[/eluser] What you have is not what I posted... Upload library not recognizing allowed file type - El Forum - 10-01-2010 [eluser]InsiteFX[/eluser] Check to make sure the mime types are on your server also... Sometimes you have to go into CPanel and turn them on. This happened to on my server for flv. It was not on. InsiteFX Upload library not recognizing allowed file type - El Forum - 10-01-2010 [eluser]mi6crazyheart[/eluser] Also check u'r upload folder is writable(file permissions to 777) or not... |