PHPackages                             dbp/relay-blob-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. dbp/relay-blob-bundle

ActiveSymfony-bundle[File &amp; Storage](/categories/file-storage)

dbp/relay-blob-bundle
=====================

A bundle for file-serving, persisting and managing

v0.2.2(1mo ago)028.7k↑211.7%[1 issues](https://github.com/digital-blueprint/relay-blob-bundle/issues)4AGPL-3.0-or-laterPHPPHP &gt;=8.2CI passing

Since Jan 30Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/digital-blueprint/relay-blob-bundle)[ Packagist](https://packagist.org/packages/dbp/relay-blob-bundle)[ RSS](/packages/dbp-relay-blob-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (94)Versions (105)Used By (4)

Relay-Blob Bundle README
========================

[](#relay-blob-bundle-readme)

DbpRelayBlobBundle
==================

[](#dbprelayblobbundle)

[GitHub](https://github.com/digital-blueprint/relay-blob-bundle) | [Packagist](https://packagist.org/packages/dbp/relay-blob-bundle) | [Changelog](https://github.com/digital-blueprint/relay-blob-bundle/blob/main/CHANGELOG.md)

The blob bundle provides an API for abstracting different shared storage systems. You can upload a file unauthorized via the API to a configured bucket and gets a short ephemeral link. Authentication takes place via signed requests. The file is attached to the bucket, not to an owner.

A bucket can be an application or an application space. For example, you can have two buckets with a different target group for one application. A bucket is configured in the config file.

Requirements
------------

[](#requirements)

You need a DbpRelayBlobConnector bundle installed to make this bundle working. E.g. [DbpRelayBlobConnectorFilesystemBundle](https://github.com/digital-blueprint/relay-blob-connector-filesystem-bundle)

Bundle installation
-------------------

[](#bundle-installation)

You can install the bundle directly from [packagist.org](https://packagist.org/packages/dbp/relay-blob-bundle).

```
composer require dbp/relay-blob-bundle
```

Integration into the Relay API Server
-------------------------------------

[](#integration-into-the-relay-api-server)

- Add the bundle to your `config/bundles.php` in front of `DbpRelayCoreBundle`:

```
...
Dbp\Relay\BlobBundle\DbpRelayBlobBundle::class => ['all' => true],
Dbp\Relay\CoreBundle\DbpRelayCoreBundle::class => ['all' => true],
];
```

If you were using the [DBP API Server Template](https://github.com/digital-blueprint/relay-server-template)as template for your Symfony application, then this should have already been generated for you.

- Run `composer install` to clear caches

Configuration
-------------

[](#configuration)

The bundle has multiple configuration values that you can specify in your app, either by hard-coding it, or by referencing an environment variable.

For this create `config/packages/dbp_relay_blob.yaml` in the app with the following content:

```
dbp_relay_blob:
  database_url: %env(resolve:DATABASE_URL)%'
  reporting_interval: "0 11 * * MON" # when notification cronjob should run
  cleanup_interval: "*/5 * * * *" # when cleanup cronjob should run
  file_integrity_checks: true # if file integrity checks should be performed periodically
  integrity_check_interval: "0 0 1 * *" # when integrity check cronjob should run
  bucket_size_check_interval: "0 2 * * 1" # when bucket size check cronjob should run
  quota_warning_interval: "0 7 * * *" # when bucket quota should be checked and if needed warning emails should be sent
  additional_auth: true # enable client credential flow
  buckets:
    test_bucket:
      service: 'Dbp\Relay\BlobConnectorFilesystemBundle\Service\FilesystemService' # The path to a dbp relay blob connector service
      internal_bucket_id: '019072b9-7736-7430-aabd-ad1bbeeebacf' # A given internal id for a bucket
      bucket_id: 'test-bucket' # friendly name of the bucket thats also used for the request
      key: '12345' # public key for signed request
      quota: 500 # Max quota in MB
      notify_when_quota_over: 70 # percent of quota when the bucket owner should be notified that the storage is running out
      report_when_expiry_in: 'P30D' # duration of how much in advance a bucket owner or user should be warned about the deletion of files
      bucket_owner: 'john@example.com' # Email who will be notified when quota is reached
      link_expire_time: 'P7D' # Max expire time of sharelinks in ISO 8601
      warn_quota: # Notification configuration how emails are sent when the quota is about to be reached
        dsn: '%env(TUGRAZ_MAILER_TRANSPORT_DSN)%'
        from: 'noreply@tugraz.at'
        to: 'john@example.com'
        subject: 'Blob Bucket Quota Warning'
        html_template: 'emails/warn-quota.html.twig'
      reporting: # Reporting configuration how emails are sent when files are about to expire
        dsn: '%env(TUGRAZ_MAILER_TRANSPORT_DSN)%'
        from: 'noreply@tugraz.at'
        to: 'john@example.com' # this email is a fallback, if no email field of a file is set
        subject: 'Blob file Deletion Report'
        html_template: 'emails/reporting.html.twig'
      integrity: # Integrity check configuration how emails are sent when file hash or metadata hash do not match with the saved file or metadata
        dsn: '%env(TUGRAZ_MAILER_TRANSPORT_DSN)%'
        from: 'noreply@tugraz.at'
        to: 'john@example.com'
        subject: 'Blob File Integrity Check Report'
        html_template: 'emails/integrity.html.twig'
      additional_types:
        - generic_id_card: '%kernel.project_dir%/config/packages/schemas/relay-blob-bundle/test-bucket/generic_id_card.json'
```

For more info on bundle configuration see .

Development &amp; Testing
-------------------------

[](#development--testing)

- Install dependencies: `composer install`
- Run tests: `composer test`
- Run linters: `composer run lint`
- Run cs-fixer: `composer run cs-fix`

Bundle dependencies
-------------------

[](#bundle-dependencies)

Don't forget you need to pull down your dependencies in your main application if you are installing packages in a bundle.

```
# updates and installs dependencies of dbp/relay-blob-bundle
composer update dbp/relay-blob-bundle
```

Scripts
-------

[](#scripts)

### Database migration

[](#database-migration)

Run this script to migrate the database. Run this script after installation of the bundle and after every update to adapt the database to the new source code.

```
php bin/console doctrine:migrations:migrate --em=dbp_relay_blob_bundle
```

Error codes
-----------

[](#error-codes)

See the [API documentation](doc/api.md).

CronJobs
--------

[](#cronjobs)

### Cleanup Cronjob

[](#cleanup-cronjob)

This cronjob is for cleanup purposes. It starts every hour and deletes old files.

### Send Report Cronjob

[](#send-report-cronjob)

This cronjob sends reports to given email addresses, or the bucket owner. In these reports there are all files which are going to be deleted in the timeframe specified in the config. The email address are attached to these files or there is a default in the config. This cronjob starts every Monday at 9 o'clock in the Morning (UTC).

### Quota Warning

[](#quota-warning)

This cronjob sends reports to the in `warn_quota` configured email. This email lets the configured person know before the bucket space is used up. An email gets sent after the bucket is filled to a certain percentage, configured with the option `notify_when_quota_over`. The option `quota_warning_interval` indicates in which interval this should get checked.

### Bucket Size Check

[](#bucket-size-check)

This cronjob sends reports to the in `bucket_size` configured email. This email lets the configured person know if a bucket is inconsistent, either because the number of entries in the table is different than in the storage backend or because the sum of filesizes stored in the database is different than the sum of filesize of the actually stored files. An email is sent if some inconsistencies are detected. The option `bucket_size_check_interval` indicates in which interval this should get checked.

### Integrity Check

[](#integrity-check)

This cronjobs sends reports to the in `integrity` configured email. This emails lets the configured person know if the metadata or file integrity checks fail. This means, that the metadata or file hashes, which are stored upon upload, are different then the hashes of the metadata or file that are currently stored. This could indicate bitrot or manual changes in the database or file. An email is sent if some inconsistencies are detected. The option `integrity_check_interval` indicates in which interval this should get checked. The option `file_integrity_checks` can be used to enable or disable the integrity checks.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance89

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Recently: every ~32 days

Total

96

Last Release

54d ago

PHP version history (3 changes)v0.1.0PHP &gt;=7.3

v0.1.20PHP &gt;=8.1

v0.1.71PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1798101?v=4)[Patrizio Bekerle](/maintainers/pbek)[@pbek](https://github.com/pbek)

![](https://avatars.githubusercontent.com/u/116099192?v=4)[dbp-deploy](/maintainers/dbp-deploy)[@DBP-deploy](https://github.com/DBP-deploy)

---

Top Contributors

[![manuelkocher](https://avatars.githubusercontent.com/u/122824716?v=4)](https://github.com/manuelkocher "manuelkocher (422 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (197 commits)")[![lazka](https://avatars.githubusercontent.com/u/991986?v=4)](https://github.com/lazka "lazka (188 commits)")[![tsteinwen13](https://avatars.githubusercontent.com/u/37624000?v=4)](https://github.com/tsteinwen13 "tsteinwen13 (98 commits)")[![tobiasgv](https://avatars.githubusercontent.com/u/122861711?v=4)](https://github.com/tobiasgv "tobiasgv (78 commits)")[![pbek](https://avatars.githubusercontent.com/u/1798101?v=4)](https://github.com/pbek "pbek (24 commits)")[![euneuber](https://avatars.githubusercontent.com/u/3296589?v=4)](https://github.com/euneuber "euneuber (18 commits)")

---

Tags

dbp-relaystorage-api

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dbp-relay-blob-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/dbp-relay-blob-bundle/health.svg)](https://phpackages.com/packages/dbp-relay-blob-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
