amritpa9's avatar

i am trying to upload Mp3 audio file but getting error response

Help Me , i am trying to upload Mp3 Audio File but getting error message response checked with firebug. Laravel VERSION = '4.2.17';

{"message":"The audio must be a file of type: mpga.","status":"error"}

0 likes
10 replies
tykus's avatar

There is no Laravel v4.7 ??

1 like
amritpa9's avatar

VERSION = '4.2.17'; sorry, this is version

zion's avatar

Add the .mp3 extension to the filetypes allowed should do the trick. If not, post some more details, such as a part of the code.

1 like
amritpa9's avatar

here is app controller code, $input = Input::all(); $validator = Validator::make($input, array( 'title' => 'required|between:3,200', 'audio' => 'mimes:mpga', 'artist' => 'required|between:1,200', ) );

i tried to change it into mp3, but did not work...

amritpa9's avatar

some mp3 files got uploaded but some not, i am confused...

rin4ik's avatar
rin4ik
Best Answer
Level 50

remove this 'audio' => 'mimes:mpga', and try again

rin4ik's avatar

you can try these as well

'audio' => 'mimes:audio/mpeg',
'audio' => 'mimes:mpga,wav',
amritpa9's avatar

i tried these but it gave me same error with their format. if i use mpeg it show audio mus be 'mped format' same on wav

Please or to participate in this conversation.