Unable to upload a track using the soundcloud API

2020-07-25 09:06发布

问题:

I am unable to upload any tracks larger than about 7MB (413 Request Entity Too Large is returned). This functionality was previously working and the soundcloud api states that tracks can be upto 500MB.

Here is an example using curl with a successful upload(4.9MB) and an unsuccessful one(7.4MB)

I have provided dropbox links to the tracks(my own production, so no copyright issues!!!) if anyone wants to try to replicate. You will need to add your oauth_token.

successful upload = 4900kb_307sec_128kbps_44100hz.mp3

curl -i -X POST "https://api.soundcloud.com/tracks.json" \
           -F 'oauth_token=********' \
           -F 'track[asset_data]=@4900kb_307sec_128kbps_44100hz.mp3' \
           -F 'track[title]=A 4.9MB track' \
           -F 'track[sharing]=public'

HTTP/1.1 100 Continue

HTTP/1.1 201 Created
Access-Control-Allow-Headers: Accept, Authorization, Content-Type, Origin
Access-Control-Allow-Methods: GET, PUT, POST, DELETE
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Date
Age: 0
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Wed, 06 Nov 2013 18:22:57 GMT
Location: https://api.soundcloud.com/tracks/118866401
Server: nginx
Via: 1.1 varnish
X-Cache: MISS
X-Cacheable: NO:Cache-Control=no-cache
X-Runtime: 436
X-Varnish: 3652774389
Content-Length: 1623

unsuccessful upload = 7400kb_307sec_192kbps_44100hz.mp3

curl -i -X POST "https://api.soundcloud.com/tracks.json" \
          -F 'oauth_token=********' \
          -F 'track[asset_data]=@7400kb_307sec_192kbps_44100hz.mp3' \
          -F 'track[title]=A 7.4MB track' \
          -F 'track[sharing]=public'   

HTTP/1.1 100 Continue

HTTP/1.1 413 Request Entity Too Large
Date: Wed, 06 Nov 2013 18:23:21 GMT
Server: ECS (lhr/4799)
Content-Length: 0
Connection: close       

thanks

回答1:

We have the same issue with soundcloud. Seems to be an issue in their nginx.conf (webserver configuration).

Please contact Soundcloud support for developers.



回答2:

Was an issue in SoundCloud API routing. Has been fixed now.

For details see comments at: Soundcloud: increased 413 failures (Request Entity Too Large) on upload



标签: soundcloud