# @todo Move this back to admin/config/media/file-types in Drupal 8 if MenuTreeStorage::MAX_DEPTH is increased to a value higher than 9.
entity.file_type.collection:
  path: /admin/structure/file-types
  defaults:
    _entity_list: 'file_type'
    _title: 'File types'
  requirements:
    _permission: 'administer file types'

entity.file_type.add_form:
  path: /admin/structure/file-types/add
  defaults:
    _entity_form: 'file_type.default'
    _title: 'Add file type'
  requirements:
    _permission: 'administer file types'

entity.file_type.edit_form:
  path: /admin/structure/file-types/manage/{file_type}/edit
  defaults:
    _entity_form: 'file_type.default'
    _title: 'Manage file types'
  requirements:
    _permission: 'administer file types'

entity.file_type.enable:
  path: /admin/structure/file-types/manage/{file_type}/enable
  defaults:
    _entity_form: 'file_type.enable'
    _title: 'Enable file type'
  requirements:
    _permission: 'administer file types'

entity.file_type.disable:
  path: /admin/structure/file-types/manage/{file_type}/disable
  defaults:
    _entity_form: 'file_type.disable'
    _title: 'Disable file type'
  requirements:
    _permission: 'administer file types'

entity.file_type.delete_form:
  path: /admin/structure/file-types/manage/{file_type}/delete
  defaults:
    _entity_form: 'file_type.delete'
    _title: 'Delete file type'
  requirements:
    _permission: 'administer file types'

entity.file.add_form:
  path: /file/add
  defaults:
    _form: '\Drupal\file_entity\Form\FileAddForm'
    _title: 'Add file'
  requirements:
    _entity_create_access: 'file'
  options:
    _admin_route: TRUE

file_entity.file_add_upload:
  path: /file/add/upload
  defaults:
    _controller: '\Drupal\file_entity\Controller\FileController::FileAddUpload'
    _title: 'Upload'
  requirements:
    _permission: 'access content'
  options:
    _admin_route: TRUE

file_entity.file_add_upload_file:
  path: /file/add/upload/file
  defaults:
    _controller: '\Drupal\file_entity\Controller\FileController::FileAddUploadFile'
    _title: 'File'
  requirements:
    _permission: 'access content'
  options:
    _admin_route: TRUE

entity.file.canonical:
  path: /file/{file}
  defaults:
    _entity_view: 'file.full'
    _title: 'File'
  requirements:
    _entity_access: 'file.view'

file_entity.file_download:
  path: /file/{file}/download
  defaults:
    _controller: '\Drupal\file_entity\Controller\FileController::download'
    _title: 'Download file'
  requirements:
    _entity_access: 'file.download'

entity.file.edit_form:
  path: /file/{file}/edit
  defaults:
    _entity_form: 'file.edit'
    _title: 'Edit'
  requirements:
    _entity_access: 'file.update'
  options:
    _admin_route: TRUE

entity.file.inline_edit_form:
  path: /file/{file}/inline-edit
  defaults:
    _controller: '\Drupal\file_entity\Controller\FileController::inlineEdit'
  requirements:
    _entity_access: 'file.update'

entity.file.delete_form:
  path: /file/{file}/delete
  defaults:
    _entity_form: 'file.delete'
    _title: 'Delete file'
  requirements:
    _entity_access: 'file.delete'
  options:
    _admin_route: TRUE

file_entity.multiple_delete_confirm:
  path: /admin/content/files/delete
  defaults:
    _form: '\Drupal\file_entity\Form\FileDeleteMultipleForm'
  requirements:
    _permission: 'administer files'

file_entity.settings:
  path: /admin/config/media/file-settings
  defaults:
    _form: '\Drupal\file_entity\Form\FileSettingsForm'
    _title: 'File settings'
  requirements:
    _permission: 'administer files'

file_entity.file_add_archive_form:
  path: /admin/content/files/archive
  defaults:
    _form: '\Drupal\file_entity\Form\FileAddArchiveForm'
    _title: 'Upload archive'
  requirements:
    _permission: 'administer files'
  options:
    _admin_route: TRUE

