 
 Template.InsertImageDialog.events
   "change #insert_image": (event, template) ->
+    template.upload_ready.set( false )
+
     div = template.find("#preview")
     $(div).empty()
     append_spinner(div)

  canvas

handle_file_step_two = ( chosen_file, template, opts ) ->
  if opts.full_image

    max_width = 150 # from .no-thumb-item width
    max_height = 200 # from .no-thumb-item height

  @selected_files = new ReactiveVar()
  @selected_files.set([])

  @payload = new ReactiveVar()

  @upload_ready = new ReactiveVar()
  @upload_ready.set( false )

  # prevent dropping files onto page creating navigation
  # http://stackoverflow.com/a/6756680/1633026
  window.addEventListener 'dragover', ((e) ->
