Log in
Model

File

Magento\Config\Model\Config\Backend\File

What it does

This backend model handles file uploads for system configuration fields in Magento 2's admin panel.

Developers use this class when creating custom configuration fields that need to accept file uploads, such as certificates, logos, or other documents.

It manages file validation, upload directory creation with scope-specific paths, and saves the uploaded file's path to the configuration.

Public Methods

  • beforeSave()
  • validateMaxSize()