<commit_before>var upload_url = "load/Slide/upload"
var check_url = "load/Slide/info/"
var thumb_url = "load/Slide/thumb/"

var store = new Store()

function changeStatus(step, text){
  text = JSON.stringify(text)
  text = step + " | " + text
  document.getElementById("load_status").innerHTML=text
}

function handleUpload(file, filename){
  var data = new FormData()
  data.append('file', file)
  data.append('filename', filename)
  changeStatus("UPLOAD", "Begun upload")
  fetch(upload_url, {
    credentials: "same-origin",
    method: "POST",
    body: data
  }).then(
    response => response.json() // if the response is a JSON object
  ).then(
    success => changeStatus("UPLOAD", success) // Handle the success response object
  ).catch(<commit_msg>add study and specimen to loader js<commit_after>var upload_url = "load/Slide/upload"
var check_url = "load/Slide/info/"
var thumb_url = "load/Slide/thumb/"

var store = new Store()

function changeStatus(step, text){
  text = JSON.stringify(text)
  text = step + " | " + text
  document.getElementById("load_status").innerHTML=text
}

function handleUpload(file, filename){
  var data = new FormData()
  data.append('file', file)
  data.append('filename', filename)
  data.append('study', "")
  data.append('specimen', "")
  changeStatus("UPLOAD", "Begun upload")
  fetch(upload_url, {
    credentials: "same-origin",
    method: "POST",
    body: data
  }).then(
    response => response.json() // if the response is a JSON object
  ).then(
    success => changeStatus("UPLOAD", success) // Handle the success response object
  ).catch(
{'fraction_non_alphanumeric': 0.14777708202880402, 'fraction_numerical': 0.0, 'mean_word_length': 4.138263665594855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '705870', 'n_tokens_mistral': 498, 'n_tokens_neox': 504, 'n_words': 133}