Permalink
Browse files

little change in upload song

  • Loading branch information...
1 parent fbcdca2 commit 75bc1bebc3c6d4d22f7d4d20403e28f8b03a7743 @siscia committed May 30, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/echonest_api/core.clj
@@ -47,7 +47,9 @@
(with-open [client (client/create-client)]
(let [response (client/POST client url
:query queri
- :body (File. path-to-song)
+ :body (cond
+ (string? path-to-song) (File. path-to-song)
+ (.isFile path-to-song) path-to-song)
:headers {"Content-Type" "application/octet-stream"}
:timeout -1)]
(client/await response))))]

0 comments on commit 75bc1be

Please sign in to comment.