Hi, I'm trying to use Image Resizer and am goofing up on the syntax
somewhere:
(defn update-profile [firstname lastname email file]
(let [member-id (session/get :member-id)
redirecturl (str /member/ member-id)
original-file-path(str (img-path) /
Just from the looks of the exception, you might need to pass an
input-stream or reader instead of a path.
The Dude (Abides) writes:
Hi, I'm trying to use Image Resizer and am goofing up on the syntax
somewhere:
(defn update-profile [firstname lastname email file]
(let [member-id
2014-02-25 16:46 GMT+04:00 Moritz Ulrich mor...@tarn-vedra.de:
Just from the looks of the exception, you might need to pass an
input-stream or reader instead of a path.
which can be instantiated with
http://clojuredocs.org/clojure_core/clojure.java.io/input-stream
and
Hi Moritz and Michael, thanks for the pointer in the right direction.
Almost there except for 1 point I think. The whole operation is made of 2
functions, one to upload/resize/save and the other to provide a unique
filename by original filename + timestamp.
(defn add-timestamp [filename]
(let
Hi Moritz and Michael, thanks for the pointer in the right direction.
Almost there except for 1 point I think. The whole operation is made of 2
functions, one to upload/resize/save and the other to provide a unique
filename by original filename + timestamp.
(defn add-timestamp [filename]
(let
I got the file naming fixed with:
(upload-file (img-path) (assoc-in file [:filename] new-file-name))
The last part is reading in the uploaded file so it can be resized with
Image Resizer. I wrote the code as:
(with-open [rdr (clojure.java.io/reader (str (img-path) /
new-file-name))])
As a