 
 (defn temp-file [format]
   (when format
-    (File/createTempFile "upload-resize" (formats format))))
+    (File/createTempFile "upload-resize" (normal-suffixes format))))
 
 (defn write-image [buffered-image format]
   (when buffered-image

(def cdn "http://c.ontrail.net")
(def upload-url "/file-upload/upload.html")

(def formats {:png ".png" :gif ".gif" :jpg ".jpg"})

(defn image-size [buffered-image]
  (when buffered-image


(defn image-format-of [filename]
  (when filename
    (last
      (first
        (filter (fn [[suffix _]]
                  (.endsWith filename suffix)) formats)))))

(defn put-original [tempfile s3-name format]
