azure_storage_rest
A lightweight, modern Drupal 10/11 integration for Microsoft Azure Blob Storage. This module provides a native azure:// stream wrapper and relies strictly on the Azure REST API, completely replacing the heavy and officially deprecated microsoft/azure-storage-blob PHP SDK.
Features
This module provides a robust, future-proof connection between Drupal and Azure Blob Storage. Its unique features include:
- Zero Dependencies: It relies entirely on Drupal Core's HTTP client (Guzzle) and avoids the bloat and deprecation warnings of the old Microsoft PHP SDK.
- Multi-Profile Architecture: Built with Configuration Entities, allowing you to configure multiple Azure connections simultaneously (e.g., one for CDN assets, another for raw data imports/exports).
- Native Stream Wrapper: Registers the
azure://stream wrapper natively into Drupal. You can seamlessly use Azure Blob Storage with Drupal's Core Media, Image Styles, and File fields. - Developer Friendly Service: Exposes an
azure_blob_storage.client_factoryservice for custom module developers to easily interact with blobs (list, get, put, delete) via the Azure REST API using SharedKey authentication.
Post-Installation
Once installed, navigate to Configuration > Web services > Azure Blob Storage Profiles (/admin/config/services/azure-blob-storage).
From there, click "Add Profile" to configure your storage account name, access key, and default container. The UI includes a convenient "Save and Test Connection" button to instantly verify your credentials with Microsoft Azure.
Once your profile is created (e.g., with the machine name cdn_assets), you can immediately start referencing files in code or mapping file fields using the URI prefix: azure://cdn_assets/my-image.jpg.
Additional Requirements
This project is completely self-contained. It requires Drupal 10.3 or higher (or Drupal 11) and PHP 8.1+, as it leverages modern PHP features constraint-free.
It does not require any external Composer libraries, Flysystem adapters, or Microsoft SDKs.
Recommended modules/libraries
While this module acts as a standalone Stream Wrapper, it is highly recommended to use it alongside Drupal Core's Media and File modules to seamlessly offload heavy digital assets directly to the Microsoft Cloud.
Similar projects
If there are modules providing similar functionality, please describe what differentiates them.
- Azure Storage: The traditional module for Azure integration. However, it relies heavily on the legacy, officially deprecated
microsoft/azure-storage-blobPHP library, which limits PHP 8.3+ compatibility and inflates the vendor directory. Our module solves this by strictly using the lightweight Azure REST API directly via Guzzle.
Supporting this Module
(Leave this empty or add a link if you or Vinci Immobilier plan to accept sponsorships)
Community Documentation
For advanced API usage, you can refer directly to the Azure Blob Storage REST API Reference, as the azure_blob_storage.client_factory service methods closely mirror the official Microsoft endpoints.