       $( @upload_complete_form_to_fill + ' ' + '#' + "#{@resource}_#{@attribute}_file_path" ).val( "#{@base_key}/#{upload_file.file.name}" )
       $( @upload_complete_form_to_fill + ' ' + '#' + "#{@resource}_#{@attribute}_filename" ).val( upload_file.file.name )
       $( @upload_complete_form_to_fill + ' ' + '#' + "#{@resource}_#{@attribute}_size" ).val( upload_file.file.size )
-      $( @upload_complete_form_to_fill + ' ' + '#' + "#{@resource}_#{@attribute}_type" ).val( upload_file.file.media_type )
+      $( @upload_complete_form_to_fill + ' ' + '#' + "#{@resource}_#{@attribute}_type" ).val( upload_file.file.type )
 
 
 class @AnacondaUploadFile

  file_completed_upload: (data) ->
    upload_file = data.context
    DLog "#{upload_file.file.name} completed uploading"
    if @upload_complete_post_url? && @upload_complete_post_url != ""
      DLog "will now post to #{@upload_complete_post_url}"


      return true
    return false

  reset: ->
    @files_for_upload = []
    @upload_details_container.html ''

  add_file: (data) ->
    upload_file = new AnacondaUploadFile data
    if @is_allowed_type(upload_file)
