 (defn save-image-document-click-callback [create? language feed-name]
   (let [file (:obj @*file*)]
     (if file
-      (let [reader (new (js* "FileReader"))]
+      (let [reader (FileReader.)]
         (set! (.-onload reader)
               (fn [e]
                 (let [image-data (util/map-to-obj

(def *file* (atom {}))

(defn display-image-preview [file title]
  (let [reader (new (js* "FileReader"))]
    (set! (.-onload reader)
          (fn [e]
            (ui/render-template (dom/getElement "image-preview")

      (ui/display-error (dom/getElement "status-message")
                        could-not-save-document-err))))

(defn save-existing-document-click-callback [language feed-name & _]
  (document/update-doc (.-value (dom/getElement "slug"))
                       save-existing-document-xhr-callback
                       (get-document-value-map! language feed-name)))

(defn save-existing-menu-document-click-callback [language feed-name & _]
  (document/update-doc (.-value (dom/getElement "slug"))
                       save-existing-document-xhr-callback
                       (get-document-value-map!
