 
 (defn upload-section []
   (let [form-ref       (r/atom nil)
-        file-input-ref (r/atom nil)
-        upload-state   (r/atom {})]
-    ; TODO:
-    ; - make state a list of chans, and append to it the retured one
-    ; - loop over that list to diplay statuses
+        file-input-ref (r/atom nil)]
     (fn []
       [:section#upload
        [:h2 "Upload"]

                      (-> path (split "\\") last)  ; C:\fakepath\file-name
                      "No file selected.")))]]]

       [track-upload upload-state]])))

;; -------------------------
;; Tracks

;; -------------------------
;; Upload

(defn track-upload [{loaded      :loaded
                     total       :total
                     status      :status
                     status-body :body}]

  (let [{error-msg :msg
         track     :track} status-body

        percentage (-> loaded
                       (/ total) (* 100))]

    (if (< 0 percentage 100)
      [:progress.pure-input-1 {:max 100 :value percentage}]

