Forums » Bugs & Problems Search

Filename of uploaded file New Reply

Author Post
Posts: 26
Registered: Sep 10, 2008

Here's a weird problem:

In my Flash API, I was lazy, and always reported the filename of the uploaded file as "file". That is, my post always included

Content-Disposition: form-data; name="file"; filename="file"
Content-Type: application/octet-stream

I didn't think It should matter.

After testing the method many times, I started to receive computation errors for every single file. I know the files were uploaded successfully, I could call the API methods with their MD5, but they all returned computation errors.

After changing my upload method to use a more unique filename, (and altering the MD5 of the file by changing its ID3 tag), the computation worked fine every time. Changing the filename back to "file" caused computation errors once again.

I last reproduced this at 19:30 PST.

Here's one of the failing IDs: music://id.echonest.com/~/TR/TRJHSSB1225D312A3B

Same track, different ID3, uploaded with a unique filename, and succeeded: music://id.echonest.com/~/TR/TRXTICG1225D50E351

Posts: 666
Registered: Sep 08, 2008

also - this is a headscratcher. We'll see if we can reproduce it here.

Paul

Posts: 26
Registered: Sep 10, 2008

I can still reproduce it, try using http://static.ryanberdeen.com/projects/echo-nest-flash-api/demos/remix-broken.swf

Posts: 666
Registered: Sep 08, 2008

ryan - thanks for the swf link - it may be a few days before we can take a hard look at the issue so if it is possible for you to keep that link live for a while it will really help.

Paul

Posts: 105
Registered: Sep 05, 2008

also: the times that it works, do you send a "valid" soundfile extension like .mp3 or .wav or .aif? Can you try setting your filename param to file.mp3 for example?

Posts: 26
Registered: Sep 10, 2008

Yes, when I changed it, I added a valid extension.

With the extension, it works fine, without it, a computation error results. I had thought that it was originally working without extensions, but I can't reproduce that.

Anyway, the biggest problem here is that a subsequent upload of the same file with an valid extension will still return a computation error, based, I'm assuming, on the MD5 of the file. As a result, I effectively poison your analysis cache, as identical (valid) files can't be analyzed (I think).

Requiring a valid extension seems reasonable (and obvious in retrospect). It would be nice to have that mentioned in the API docs for upload, and to have upload return an error indicating that the file does not appear to be analyzable based on the filename.

Ryan

Reply to this Thread

You must log in to post a reply.