Hi Manil, Have you tried setting the content type to "Content-Type: audio/mpeg" and enabling binary relay for said content type? [2]
[2] - https://docs.wso2.com/display/ESB460/Configuring+Message+Relay Thanks and Regards, Ruwan Yatawara Senior Software Engineer, WSO2 Inc. email : [email protected] mobile : +94 77 9110413 blog : http://thoughts.ruwan-ace.com/ www: :http://wso2.com On Wed, Jul 2, 2014 at 4:02 PM, Manil Liyanage <[email protected]> wrote: > 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&track[title]=testsong&track[asset_data]=/home/manil/ola.mp3 > > <https://api.soundcloud.com/tracks.json?oauth_token=mytoken&track[title]=testsong&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 > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
