dbp/relay-blob-library

PHP helper library for interaction with the dbp/relay-blob-bundle.

Installs: 36 366

Dependents: 5

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 0

Open Issues: 1

pkg:composer/dbp/relay-blob-library

v0.3.10 2025-06-10 09:15 UTC

README

GitHub | Packagist | Changelog

Test

PHP helper library for interaction with the relay-blob-bundle.

Installation

composer require dbp/relay-blob-library

Usage

Here is an example of how to use the library in HTTP mode, with OIDC authentication enabled:

    // create the API
    $blobApi = BlobApi::createHttpModeApi(
        $bucketIdentifier, $bucketKey, $blobBaseUrl,
        $oidcEnabled, $oidcProviderUrl, $oidcClientId, $oidcClientSecret);

    $blobFile = new BlobFile();
    $filePath = 'files/myFile.txt';
    $blobFile->setFilename(basename($filePath));
    $blobFile->setFile(new SplFileInfo($filePath));
    $blobFile->setPrefix('my-prefix');
    
    // add the file    
    $blobFile = $blobApi->addFile($blobFile);

    // get the file
    $blobFile = $blobApi->getFile($blobFile->getIdentifier());

    // remove the file
    $blobApi->removeFile($blobFile->getIdentifier());

Integration into a Symfony bundle

Soon to come.