There was an error while loading. Please reload this page.
Welcome to the ui wiki!
[:input {:type "file" :id "file" :name "file" :on-change put-upload}]
(defn put-upload [e] (let [target (.-currentTarget e) file (-> target .-files (aget 0)) reader (js/FileReader.)] (js/console.log target) (js/console.log file) (set! (.-onload reader) #(js/console.log (-> % .-target .-result))) (.readAsText reader file)))