         xhr
       cache: false
       contentType: false
-      complete: (jqxhr) =>
-        @uploadCompleted jqxhr
+
+      success: (response) =>
+        handleUp(response)
         return
+      error: (jqxhr)=>
+        utils.log("ERROR: got error uploading file #{jqxhr.responseText}")
 
       processData: false
       data: @formatData(file)


  displayAndUploadImages: (file)->
    @displayCachedImage file
    @uploadFile file

  imageSelect: (ev)->
    $selectFile = $('<input type="file" multiple="multiple">').click()


  insertTemplate: ()->
    "<figure contenteditable='false' class='graf graf--figure is-defaultValue' name='#{utils.generateUniqueName()}' tabindex='0'>
      <div style='' class='aspectRatioPlaceholder is-locked'>
        <div style='padding-bottom: 100%;' class='aspect-ratio-fill'></div>
        <img src='' data-height='375' data-width='600' data-image-id='' class='graf-image' data-delayed-src=''>
      </div>
      <figcaption contenteditable='true' data-default-value='Type caption for image (optional)' class='imageCaption'>
