php-soundcloud
php-soundcloud copied to clipboard
Couldn't upload that sound.
trafficstars
When I try to upload audio file to soundcloud, It throws error.
Here is my code:
$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();
}
And this is the error, I'm receiving
{"errors":[{"error_message":"Couldn't upload that sound."},{"error_message":"Couldn’t upload that file, sure they’re valid soundfiles?"}]}
Is anybody have problem with PHP api? Off, but maybe related with this api.
I used next line to return user followers and works perfect: $follow = json_decode($soundcloud->get('users/{{used_id}}/followers'), true);
But before few days, I noticed that isn't work, and return 404
The requested URL responded with HTTP code 404.
@CheeVT Yes I'm getting same error while getting follower. Did you figure out what's the issue?