Re: Simple way to get image from url

2012-10-16 Thread Yakovlev Roman
new to java world so as i found there is no simple way to get image file from url like : http://example.com/image.jpg. What i need just to get file from url and store it to db. So we need to use buffer, stream and stuff to get file. I found this code but i guess there is a way to get things

Re: Simple way to get image from url

2012-10-16 Thread Zhitong He
url. On Monday, October 15, 2012 1:06:19 PM UTC+4, Yakovlev Roman wrote: Hi I am pretty new to java world so as i found there is no simple way to get image file from url like : http://example.com/image.jpg. What i need just to get file from url and store it to db. So we need to use buffer

Re: Simple way to get image from url

2012-10-16 Thread Jim foo.bar
On 16/10/12 13:25, Zhitong He wrote: another way to solve this, from http://users.utu.fi/machra/posts/2011-08-24-2-reddit-clojure.html (ns myapp.app (:require [clojure.java.io :as io])) (defn copy [uri file] (with-open [in (io/input-stream uri) out

Re: Simple way to get image from url

2012-10-15 Thread Andreas Liljeqvist
; {:as :byte-array}) 2012/10/15 Yakovlev Roman felix...@gmail.com Hi I am pretty new to java world so as i found there is no simple way to get image file from url like : http://example.com/image.jpg. What i need just to get file from url and store it to db. So we need to use buffer, stream and stuff

Re: Simple way to get image from url

2012-10-15 Thread Yakovlev Roman
: wrote: I think you can use clj-http: https://github.com/dakrone/clj-http (client/get http://site.com/favicon.ico; {:as :byte-array}) 2012/10/15 Yakovlev Roman feli...@gmail.com javascript: Hi I am pretty new to java world so as i found there is no simple way to get image file from url

Re: Simple way to get image from url

2012-10-15 Thread Yakovlev Roman
you can use clj-http: https://github.com/dakrone/clj-http (client/get http://site.com/favicon.ico; {:as :byte-array}) 2012/10/15 Yakovlev Roman feli...@gmail.com javascript: Hi I am pretty new to java world so as i found there is no simple way to get image file from url like : http

Re: Simple way to get image from url

2012-10-15 Thread AtKaaZ
there is no simple way to get image file from url like : http://example.com/image.jpg. What i need just to get file from url and store it to db. So we need to use buffer, stream and stuff to get file. I found this code but i guess there is a way to get things simplier. (defn fetch-data [url

Re: Simple way to get image from url

2012-10-15 Thread Dave Ray
killme2...@gmail.com wrote: I think you can use clj-http: https://github.com/dakrone/clj-http (client/get http://site.com/favicon.ico; {:as :byte-array}) 2012/10/15 Yakovlev Roman felix...@gmail.com Hi I am pretty new to java world so as i found there is no simple way to get image file from