 (def cdn "http://c.ontrail.net")
 (def upload-url "/file-upload/upload.html")
 
-(def formats {:png ".png" :gif ".gif" :jpg ".jpg"})
+(def formats {".png" :png ".PNG" :png ".gif" :gif ".GIF" :gif ".jpg" :jpg ".jpeg" :jpg ".JPG" :jpg})
+(def normal-suffixes {:png ".png" :gif ".gif" :jpg ".jpg"})
+
 
 (defn image-size [buffered-image]
   (when buffered-image


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

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


(defn temp-file [format]
  (when format
    (File/createTempFile "upload-resize" (normal-suffixes format))))

(defn write-image [buffered-image format]
  (when buffered-image
