L = "<span class=\"badge bg-warning text-dark\">Error</span>";
        tableStore[file.name+file.lastModified].insertCell(2).innerHTML = "Error "+xhr.status;
      }
    };
    fd.append('file', file);
    // Initiate a multipart/form-data upload
    concurrentuploads++;
    setTimeout(function() {
      xhr.send(fd);
    }, Math.max(concurrentuploads-5,0)*10); //TODO: longer timeouts for production
  }

  function minToString(minutes) {
    var m = minutes % 60;
    var h = (minutes-m)/60;
    return h.toS