butterfly-team/azure-blob-storage

Small library to access Microsoft Windows Azure Blob Storage with a Service or a StreamWrapper.

1.0.1 2020-09-08 17:01 UTC

This package is auto-updated.

Last update: 2024-04-09 01:34:22 UTC


README

Small library that allows you to work with Windows Azure Blob Storage from PHP.

The code is forked and adapted from the PHP Azure SDK. It was cleaned up slightly and removed all its dependencies to be very leightweight.

You can work with Windows Azure Blob from any platform (Windows or Linux) and only need an Azure storage account to get started.

Features:

  • Programmatic API to work with blobs
  • Containers Management (Private or Public)
  • Streamwrapper
  • ACLs

Installation

Suggested via composer:

{
    "require": {
        "beberlei/azure-blob-storage": "*"
    }
}

Then using the composer binary:

prompt> php composer.phar install

Configuration

<?php
use Beberlei\AzureBlobStorage\BlobClient;

$accountUrl = "http://myaccount.blob.storage.windows.net";
$accountName = "myaccount";
$accountKey = "abcdefg";

$client = new BlobClient($accountUrl, $accountName, $accountKey);