Hi All,

I'm trying to upload a song file to the soundcloud using its API. When i
upload it using curl [1] , i was able to upload it. But when I upload it
using a proxy sequence[2], it sends a error message from the API saying
cannot recognize is its as a soundfile[3].  Please let me know a solution
for this.

[1]

curl -X POST "https://api.soundcloud.com/tracks.json"; \
-F 'oauth_token=mytoken' \
-F 'track[asset_data][email protected]' \
-F 'track[title]=title' \
-F 'track[sharing]=public'



[2] - I have disable chunking because it gives a error message 411, as a
solution for it only i have used it.

<proxy xmlns="http://ws.apache.org/ns/synapse";
       name="uploadtest"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <property name="DISABLE_CHUNKING"
                   value="true"
                   scope="axis2"
                   type="STRING"/>
         <call>
            <endpoint>
               <http method="post"

uri-template="https://api.soundcloud.com/tracks.json?oauth_token=mytoken&amp;track[title]=testsong&amp;track[asset_data]=/home/manil/ola.mp3"/>
            </endpoint>
         </call>
      </inSequence>
   </target>
   <description/>
</proxy>


[3]

{"errors":[{"error_message":"Couldn't upload that
sound."},{"error_message":"Couldn't upload that file, sure they're
valid soundfiles?"}]}



Thank You,
Manil Liyanage
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to