# Schema for the configuration files of the File module.

file.settings:
  type: config_object
  label: 'File settings'
  mapping:
    description:
      type: mapping
      label: 'Description'
      mapping:
        type:
          type: string
          label: 'Type'
        length:
          type: integer
          label: 'Length'
    icon:
      type: mapping
      label: 'Icon'
      mapping:
        directory:
          type: path
          label: 'Directory'

field.storage_settings.file:
  type: base_entity_reference_field_settings
  label: 'File settings'
  mapping:
    display_field:
      type: boolean
      label: 'Enable Display field'
    display_default:
      type: boolean
      label: 'Files displayed by default'
    uri_scheme:
      type: string
      label: 'Upload destination'

field.value.file:
  type: mapping
  label: 'Default value'

base_file_field_field_settings:
  type: mapping
  mapping:
    handler:
      type: string
      label: 'Reference method'
    handler_settings:
      type: entity_reference_selection.[%parent.handler]
      label: 'Entity reference selection settings'
    file_directory:
      type: string
      label: 'File directory'
    file_extensions:
      type: string
      label: 'Allowed file extensions'
    max_filesize:
      type: string
      label: 'Maximum upload size'

field.field_settings.file:
  type: base_file_field_field_settings
  label: 'File settings'
  mapping:
    description_field:
      type: boolean
      label: 'Enable Description field'

field.formatter.settings.file_default:
  type: mapping
  label: 'Generic file format settings'

field.formatter.settings.file_rss_enclosure:
  type: mapping
  label: 'RSS enclosure format settings'

field.formatter.settings.file_table:
  type: mapping
  label: 'Table of files format settings'

field.formatter.settings.file_url_plain:
  type: mapping
  label: 'URL to file format settings'

field.widget.settings.file_generic:
  type: mapping
  label: 'File format settings'
  mapping:
    progress_indicator:
      type: string
      label: 'Progress indicator'

field_formatter_settings_base_file:
  type: mapping
  mapping:
    link_to_file:
      type: boolean
      label: 'Link to file'

field.formatter.settings.file_link:
  type: field_formatter_settings_base_file

field.formatter.settings.file_uri:
  type: field_formatter_settings_base_file
  mapping:
    file_download_path:
      type: boolean
      label: 'Display download path'

field.formatter.settings.file_filemime:
  type: field_formatter_settings_base_file
  mapping:
    filemime_image:
      type: boolean
      label: 'Display the filemime as icon'

field.formatter.settings.file_extension:
  type: field_formatter_settings_base_file
  mapping:
    extension_detect_tar:
      type: boolean
      label: 'Detect tar'

migrate.source.d6_upload_instance:
  type: migrate_source_sql
  label: 'Drupal 6 upload form display'
  mapping:
    constants:
      type: migrate_entity_constant
      label: 'Constants'
