php-echonest-api
php-echonest-api copied to clipboard
Is Local File Upload Supported?
I could easily be doing it wrong, because I know the process is different for local files than urls.
Here is a minimized function call of what I'm attempting to do: $results = $results->upload('../Libraries/54 The Con.m4a', true, 'm4a',$_FILES);
Currently this call just fails with no error message. My best guess is that passing $_FILES is not the correct way to pass the track, but I can't think of any way to pass it otherwise.
I tried unrolling it to the request() function, and I thought from the variable name" $url" it may be assuming a url is being passed. PHP isn't my strongest language though.
kengle3, were you able to find a solution? I'm in the exact same boat as you -- I can't for the life of me figure out what to pass to the 'track' parameter..
The current version of these bindings does not support local file upload.
However, we did have someone modify the source code for our project to add the functionality. I suggested that he take the time to contribute the the code back to the project.
I will see him next on Friday and let him know someone expressed interest in his solution. If he isn't interested in cleaning up the code, then I'll try to clean it up and submit it myself with his permission.
It may take a bit to get around to it though because we are both university students dealing with finals for the next two weeks.
I am wondering what the status is of this. I am trying to feed an mp3 that is located on my webserver to the echonest analyser (I've already written the uploader part).
Is it possible in any way to pass the analyzer a url to analyse?
Yes, I've added the methods for this. — Brent Shaffer
On Wed, Jun 19, 2013 at 4:20 AM, dorein [email protected] wrote:
I am wondering what the status is of this. I am trying to feed an mp3 that is located on my webserver to the echonest analyser (I've already written the uploader part).
Is it possible in any way to pass the analyzer a url to analyse?
Reply to this email directly or view it on GitHub: https://github.com/bshaffer/php-echonest-api/issues/15#issuecomment-19674460
Thank you for your quick response! I guess I can do it with $trackApi = $echonest->getTrackApi();
Do you happen to have any additional pointer, as I can't really find any documentation and I am new to this. Thanks!
Edit... oh no, it seems that there is an upload function, still not really sure how to use that though. If you would have an example, would be extremely useful!
What is the right way to call the getTrackApi()->upload method?
What is exactly expected in the 'track' field of the array parameter of the upload method? Is it just the url towards the mp3 file I want to upload or is is the file converted in special data model. If you could give a simple example it would be awesome. Thx
Hi, bshaffer! I hope you're still reading reviews ... For several days trying to sort out your echonest api library but the result is sad. My attempts to recognize local files fail. Please tell me how to use the upload function. i've tried: $ results = $ echonest-> getTrackApi () -> upload ($ dir. '/'. $ file, 'true', 'mp3', $ buckets);
unfortunately does not show errors.
Hello! Unfortunately I have not been keeping this library up-to-date… I'm not sure why the upload function would fail. Perhaps echo nest has changed their APIs? If you find out please let us know.
On Friday, April 3, 2015, urii [email protected] wrote:
Hi, bshaffer! I hope you're still reading reviews ... For several days trying to sort out your echonest api library but the result is sad. My attempts to recognize local files fail. Please tell me how to use the upload function. i've tried: $ results = $ echonest-> getTrackApi () -> upload ($ dir. '/'. $ file, 'true', 'mp3', $ buckets);
unfortunately does not show errors.
— Reply to this email directly or view it on GitHub https://github.com/bshaffer/php-echonest-api/issues/15#issuecomment-89410210 .
Sincerely, Brent Shaffer @bshaffer http://twitter.com/bshaffer