Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Local File Upload Supported? #15

Open
kengle3 opened this issue Mar 13, 2012 · 8 comments
Open

Is Local File Upload Supported? #15

kengle3 opened this issue Mar 13, 2012 · 8 comments

Comments

@kengle3
Copy link

kengle3 commented Mar 13, 2012

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.

@C0DESTR0NG
Copy link

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..

@kengle3
Copy link
Author

kengle3 commented Apr 26, 2012

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.

@dorienh
Copy link

dorienh commented Jun 19, 2013

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?

@bshaffer
Copy link
Owner

Yes, I've added the methods for this. 

Brent Shaffer

On Wed, Jun 19, 2013 at 4:20 AM, dorein notifications@github.com 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:
#15 (comment)

@dorienh
Copy link

dorienh commented Jun 19, 2013

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!

@Lamorale
Copy link

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

@yuriiua
Copy link

yuriiua commented Apr 3, 2015

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.

@bshaffer
Copy link
Owner

bshaffer commented Apr 3, 2015

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 notifications@github.com 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
#15 (comment)
.

Sincerely,
Brent Shaffer
@bshaffer http://twitter.com/bshaffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants