                                      (handle-pause! uploads uploads-order upload-slots))
                                  (= action :unpaused)
                                    (do
-                                     (.pipe blob-stream stream)
+                                     (when (:started? upload)
+                                       (.pipe blob-stream stream))
                                      (handle-unpause! uploads
                                                       uploads-order
                                                       upload-slots

                    (start-upload first-inactive-upload))))))

(defn handle-unpause! [uploads uploads-order upload-slots active-uploads upload-id]
  (if (> (count (active-uploads uploads-order uploads))
          upload-slots)
    (let [upload-to-stop-id (last (active-uploads uploads-order uploads))
          upload-to-stop (uploads upload-to-stop-id)]
      (println "upload-to-stop" upload-to-stop-id)
      (swap! app-state/app-state

             :uploads
             (assoc (:uploads @app-state/app-state)
                    upload-to-stop-id
                    (stop-upload upload-to-stop))))))

(defn upload-file! [file]
  (let [upload-id (.v4 js/uuid)
