 
     @upload_in_progress = false;
     @upload_manager().upload_completed()
-    # $( @element_id ).closest( 'form' ).submit() unless ( @upload_automatically == true )
 
 
 # class @AnacondaUploadFile


  form_submit_handler: (e) ->
    # alert( 'form_submit_handler' )
    e.preventDefault()
    self = e.data.self
    $(this).off( 'submit', self.form_submit_handler )

      @file = data.files[0]
      @file_data = data
      DLog @file
      @upload_details_container.html "<div id='upload_file_#{@get_id()}' class='upload-file #{@get_media_type(@file)}'><span class='file-name'>#{@file.name}</span><span class='size'>#{@readable_size()}</span><span class='progress-percent'></span><div class='progress'><span class='progress-bar'></span></div></div>"

      if @upload_automatically
        DLog "auto upload"
        @upload()
      else
        DLog "Not auto upload"
        #@setup_upload_button_handler()
    else
      alert "#{data.files[0].name} is a #{@get_media_type(data.files[0])} file. Only #{@allowed_types.join(", ")} files are allowed."
