a42/magento-filesystem-extension-docs

Currently in the review process in Magento Marketplace. You will be able to purchase the extensions soon. Extend the filesystem component with new features specific to multiple remote filesystems usage (Amazon S3, Google Cloud Storage, or Azure Blob Storage) with flexible configuration.


Keywords
magento, aws, azure, cloud, extension, filesystem, google, s3, service, storage
License
ADSL

Documentation

Introduction

Magento 2.4 version has already in place the filesystem abstraction needed to implement and integrate new filesystems (e.g.: external file systems like Amazon Simple Storage Service - S3) for Magento's core modules or custom modules.

There are few touchpoints not abstracted enough, as you could see in the current documentation, but this extension covers this subject to allow cloud object storage service integration into Magento 2.

In many cases, existing "Database files storage" could not be useful and definitively is not an optimal implementation since it is doing sync back to the local filesystem on missing resources.

The ultimate scope of these extensions is to extract static files storage as a microservice for the Magento 2 platform, decoupling files storage system of the computing system, at the same time providing more flexibility in web asset compression, processing, and delivery.

Read the documentation to find some of the key advantages of using these Magento 2 extensions to integrate with various cloud file storage services in a platform-agnostic manner.

What is covered with these extensions?

  • Decouple file storage system of compute component and scale them independently.

    • Install all bb/filesystem, bb/filesystem-overwrites, bb/filesystem-cms, bb/filesystem-catalog, bb/filesystem-downloadable modules.

    • Install one of the filesystem driver module eg: bb/filesystem-s3.

      A filesystem driver is a class implementing basic operations (read, write, move, etc.) on files or directories. (see: \Magento\Framework\Filesystem\DriverInterface)

    • Configure directory mapping to save and serve files directly from storage service.

  • Mapping for any media sub-directory to various filesystem services.

    For example you can make the following mapping:

    • media/catalog files to a public AWS S3 bucket
    • media/downloadable could be mapped to a private AWS S3 bucket
    • media/captcha could be kept on disk filesystem

Currently, there are 6 modules developed for Magento 2 to achieve fully abstracted filesystem implementation:

  • bb/filesystem is the core module, implementing most of the business logic:

    • directories mapping
    • configure new remote media directories for new modules (e.g.: you want to store some reports in Azure Blob storage, you can configure a new directory for this report)
    • use the media storage system of your choice for any given directory or subdirectory
    • image resize in-place without sync back to local filesystem (this require having the same configuration for the main directory and the destination of resized files)
    • :term:`OOB` this module can be used in custom modules, none of Magento core features are touched

bb/filesystem-overwrites

  • allows bb/filesystem features on built-in media directories

bb/filesystem-cms

  • configure Magento_Cms module to use bb/filesystem
  • fix some weak points on Magento core components that are not using driver object to execute basic actions on files

bb/filesystem-catalog

  • configure Magento_Catalog module to use bb/filesystem
  • fix some weak points on Magento core components that are not using driver object to execute basic actions on files

bb/filesystem-downloadable

  • Allow downloadable files to be saved in a different non-public media storage
  • fix some weak points on Magento core components that are not using driver object to execute basic actions on files

bb/filesystem-s3

  • implementation of Amazon S3 like API as a Magento filesystem driver

Author

George Babarus

Mailing list

Subscribe to the mailing list

You will receive more information and updates on the extensions developed to allow application-level optimal integration of remote filesystems (e.g.: Amazon S3, Azure Blob Storage, Google Cloud Object Storage) into Magento 2 ecosystem:

  • release notes
  • new features
  • case studies
  • new ideas
  • feature requests surveys