Skip to content

Instantly share code, notes, and snippets.

(defn upload! [owner]
(let [form (om/get-node owner "upload-form")
io (goog.net.IframeIo.)]
(goog.events.listen
io goog.net.EventType.COMPLETE #(js/console.log "COMPLETE"))
(goog.events.listen
io goog.net.EventType.SUCCESS (fn [_]
(put!
(om/get-state owner :reset-file-drop)
true)