Welcome Guest, Not a member yet? Register   Sign In
The filetype you are attempting to upload is not allowed.
#1

[eluser]edidiway[/eluser]
Okay.. for the first it is midnight now at my country, but my client report me an error that I dont why it can be happened. On the other hand, I must go to office this morning.. sorry for little vent.

the case is like this..
I build the video uploading function in this website, It allows .flv format, I try to upload .flv format and it was success.. but my client upload the same .flv file like me, but it said "The filetype you are attempting to upload is not allowed."

I am frustrated now, because my client gives me pressure that if this module not fixed, his contract with his affiliate will be canceled..

what ???
please help me..
#2

[eluser]cideveloper[/eluser]
What have you set for "allowed_types"? Mime types sometimes get messed up. You can check out the mime type with the mime_content_type function. It has been deprecated though, replaced with the pecl Fileinfo
#3

[eluser]InsiteFX[/eluser]
You may also need to set the mime type in the server it self!
#4

[eluser]edidiway[/eluser]
@cideveloper :
this is my code for "allowed types" :
Code:
$config['allowed_types'] = 'asf|avi|flv|mp4|3gp|wmv';
and this is the setting in mimes.php at config folder
Code:
'flv'   =>     array('video/flv', 'video/x-flv', 'flv-application/octet-stream', 'application/octet-stream'),

for the notes, I uploaded the video in .flv format on server, and it was success, also my client did the same, uploaded the video on server, but it was failed with the error message "The filetype you are attempting to upload is not allowed."

@InsiteFX :
what do you mean about "I need to set the mime type in the server it self" please explain it to me, because I dont understand, from my case, I have uploaded the video in .flv format on server, not in my localhost, and it was success, but it didnt work for my client.
#5

[eluser]InsiteFX[/eluser]
Some servers have restrictive mime types and you have to add them! Check in your control panel for mime types.

You can try to add this to .htaccess
Code:
AddType application/x-shockwave-flash swf
AddType video/x-flv .flv
#6

[eluser]cideveloper[/eluser]
This isn't really a solution but a test. Set the "allowed types" to allow everything and see if your client is able to upload. If yes, then its a codeigniter thing. If no, then its a server thing.




Theme © iAndrew 2016 - Forum software by © MyBB