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"}
There is no Laravel v4.7 ??
VERSION = '4.2.17'; sorry, this is version
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.
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...
some mp3 files got uploaded but some not, i am confused...
remove this 'audio' => 'mimes:mpga', and try again
@rin4ik thnku alot it work, but is it good to remove that line >?
you can try these as well
'audio' => 'mimes:audio/mpeg',
'audio' => 'mimes:mpga,wav',
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
'audio' => 'mimes:audio/mpga',
Please or to participate in this conversation.