Log in
Helper

Storage

Magento\MediaStorage\Helper\File\Storage

What it does

This helper class manages Magento 2's media file storage system, providing methods to determine the current storage backend (filesystem vs database) and synchronize files between storage types.

Developers use this when working with media files to ensure files are retrieved from the correct storage location and copied to the filesystem when needed for serving.

Public Methods

  • getCurrentStorageCode()
  • getStorageFileModel()
  • isInternalStorage()
  • getStorageModel()
  • processStorageFile()
  • saveFileToFileSystem()