Soundcloud API - Upload image from external URL for track artwork, using SC.recordupload

*爱你&永不变心* 提交于 2019-12-11 18:53:01

问题


How can I upload track artwork using the SC.recordUpload function, when the location of the image is an external URL?

My erroneous code:

imageObj = new Image();
imageObj.src = "http://maps.googleapis.com/maps/api/staticmap?center=51.4993603,-0.1074693&zoom=12&size=200x200&maptype=roadmap&sensor=false";

....(connection code and track recording)....

SC.recordUpload({
    track: {
        title: "New track",
        description: "Track description",
        sharing: "public",
        artwork_data: imageObj
      }
    }, function(track){
        //Track uploaded!
        $("#uploadStatus").html("Track uploaded!");

回答1:


Currently the SoundCloud JS SDK unfortunately does not support artwork uploading.

Sorry about that.



来源:https://stackoverflow.com/questions/10372590/soundcloud-api-upload-image-from-external-url-for-track-artwork-using-sc-reco

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!