   canvas
 
 handle_file_step_two = ( chosen_file, template, opts ) ->
+  payload = {original_file: chosen_file}
   if opts.full_image
+
+    if opts.preserve_full_image
+      payload.cached_image = opts.full_image
 
     max_width = 150 # from .no-thumb-item width
     max_height = 200 # from .no-thumb-item height

      actual_width = opts.full_image.width*scale

    thumb = getThumbnail(opts.full_image, scale)
    div = template.find("#preview")
    $(div).empty()
    div.appendChild(thumb)

handle_files = (fileList, template) ->
  # template is template instance of InsertImageDialog


Template.InsertImageDialog.events
  "change #insert_image": (event, template) ->
    template.upload_ready.set( false )

    div = template.find("#preview")
    $(div).empty()
    append_spinner(div)
