 
     (.on blob-stream "end"
       (fn []
+        (println "Upload complete: " (.-name file))
         (swap! app-state assoc :num-of-uploads (- (:num-of-uploads @app-state) 1))
         (if-not (empty? (:upload-queue @app-state))
           (let [next-file (last (:upload-queue @app-state))]


(defn pause []
  (player/pause)
  (.emit socket "pause" (player/get-position)))

(defn resume []
  (.emit socket "resume"))

(defn get-current-track-num []


  (let [stream (.createStream js/ss)
        blob-stream (.createBlobReadStream js/ss file)]
    (println "File uploading: " (.-name file))
    (println "File size: " (.-size file))

    (.emit (js/ss socket) "file-upload" stream
                                        (.-name file)
