             else
               forms_for_submit = [data]
           else
-            console.log('zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz')
             data.submit()
 
       send: (e, data) =>
-        console.log('send')
         $uploadForm.trigger('show_cancel_button')
         $(selectors.cancel_upload).on 'click', (e) =>
           data.xhr().abort()

      $(selectors.cancel_upload).addClass('hide')

    $uploadForm.on 'show_cancel_button', ->
      console.log('show_cancel_button')
      $(selectors.submit).hide()
      $(selectors.cancel_upload).removeClass('hide')

    $uploadForm.on 's3_upload_complete', (e, content) =>
      console.log('s3_upload_complete')
      $(selectors.s3_form).find(selectors.disable_fields).removeAttr('disabled')
      console.log('s3_upload_complete 1')
      $uploadForm.find(".upload_uploading").hide()
      console.log('s3_upload_complete 2')
      $uploadForm.find(".upload_finished").show().removeClass "hidden"
      console.log('s3_upload_complete 3')
      $(selectors.submit).removeClass("disabled").prop "disabled", false
      console.log('s3_upload_complete 4')
      $("#upload_skip_link").removeClass "hidden"
      console.log('s3_upload_complete 5')
      $("#upload_s3_path").val(content.filepath)
      console.log('s3_upload_complete 6')
      console.log('start submit')
      console.log(selectors.s3_form)
      console.log($("#{selectors.s3_form} #form_submit").length)
      $("#{selectors.s3_form} #form_submit").submit()
#      Hack for IE9
#      $("#{selectors.s3_form} #form_submit").submit (e) ->
#        e.preventDefault();
#        $(this).closest("form").submit()

      $(selectors.s3_form).trigger('submit')

  build_content_object = ($uploadForm, file, result) ->
    console.log('zzzzzzzzzzzzzzzzzzzz')
    content = {}
    if result # Use the S3 response to set the URL to avoid character encodings bugs
      content.url            = $(result).find("Location").text()

        $.each $uploadForm.find(settings.disable_fields_after_submit), (index, item) =>
          $(item).removeAttr('disabled')

      if  validation_form
        $(forms_for_submit).submit()

      if settings.allow_send_form_without_file && $uploadForm.find('#file_name_for_upload').text().length == 0
        true
      else
        false

  setUploadForm = ->
