无法使用大于7MB的soundcloud API上传曲目

时间:2013-11-06 18:44:42

标签: soundcloud

我无法上传任何大于7MB的曲目(413请求实体太大)。此功能以前正在使用soundcloud api states that tracks can be upto 500MB

以下是使用curl成功上传(4.9MB)和不成功上传(7.4MB)的示例

如果有人想尝试复制,我已经提供了轨道的dropbox链接(我自己的制作,因此没有版权问题!)。您需要添加oauth_token。

成功上传= 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

上传不成功= 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       

感谢

2 个答案:

答案 0 :(得分:0)

我们与soundcloud有同样的问题。似乎是他们的nginx.conf(webserver)中的一个问题 组态)。

请与开发人员联系Soundcloud support

答案 1 :(得分:0)

SoundCloud API路由中存在问题。现在已经修好了。

有关详情,请参阅以下评论: Soundcloud: increased 413 failures (Request Entity Too Large) on upload