         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)

      img_tag.height = i.height
      img_tag.width  = i.width
      unless i.width is 0 || i.height is 0
        $('img.graf-image').parent(".aspectRatioPlaceholder").css
          'max-width': i.width
          'max-height': i.height

    reader.readAsDataURL(file)



  displayAndUploadImages: (file)->
    @displayCachedImage file

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