When I try to upload audio file to soundcloud, It throws error.
$SC = new Soundcloud/Service('id','secret','redirect_uri');
$track = array(
'track[title]' => 'My awesome track',
'track[tags]' => 'testing',
'track[asset_data]' => '@/home/vagrant/Code/livecenter/public/test.mp3'
);
try {
$response = $SC->post('tracks', $track);
return $response;
} catch(\Soundcloud\Exception\InvalidHttpResponseCodeException $e) {
return $e->getHttpBody();
}
{"errors":[{"error_message":"Couldn't upload that sound."},{"error_message":"Couldn’t upload that file, sure they’re valid soundfiles?"}]}