{"id":18724637,"url":"https://github.com/digital-blueprint/relay-blob-bundle","last_synced_at":"2025-11-11T16:30:17.703Z","repository":{"id":163324884,"uuid":"635807022","full_name":"digital-blueprint/relay-blob-bundle","owner":"digital-blueprint","description":"The blob bundle provides an API for abstracting different shared storage systems.","archived":false,"fork":false,"pushed_at":"2024-04-11T14:31:24.000Z","size":812,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-12T00:10:43.155Z","etag":null,"topics":["dbp-relay","storage-api"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digital-blueprint.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-03T13:49:19.000Z","updated_at":"2024-04-15T10:51:19.871Z","dependencies_parsed_at":null,"dependency_job_id":"83507222-1c40-444a-9ab0-f4bd66e34bee","html_url":"https://github.com/digital-blueprint/relay-blob-bundle","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Frelay-blob-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Frelay-blob-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Frelay-blob-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Frelay-blob-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digital-blueprint","download_url":"https://codeload.github.com/digital-blueprint/relay-blob-bundle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239593064,"owners_count":19664855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dbp-relay","storage-api"],"created_at":"2024-11-07T14:07:22.815Z","updated_at":"2025-11-11T16:30:17.438Z","avatar_url":"https://github.com/digital-blueprint.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Relay-Blob Bundle README\n================================\n\n# DbpRelayBlobBundle\n\n[GitHub](https://github.com/digital-blueprint/relay-blob-bundle) |\n[Packagist](https://packagist.org/packages/dbp/relay-blob-bundle) |\n[Changelog](https://github.com/digital-blueprint/relay-blob-bundle/blob/main/CHANGELOG.md) \n\nThe blob bundle provides an API for abstracting different shared storage systems.\nYou can upload a file unauthorized via the API to a configured bucket and gets a short ephemeral link. \nAuthentication takes place via signed requests.\nThe file is attached to the bucket, not to an owner.\n\nA bucket can be an application or an application space. For example, you can have two buckets with a different target group for one application.\nA bucket is configured in the config file.\n\n## Requirements\n\nYou need a DbpRelayBlobConnector bundle installed to make this bundle working. E.g. [DbpRelayBlobConnectorFilesystemBundle](https://github.com/digital-blueprint/relay-blob-connector-filesystem-bundle)\n\n## Bundle installation\n\nYou can install the bundle directly from [packagist.org](https://packagist.org/packages/dbp/relay-blob-bundle).\n\n```bash\ncomposer require dbp/relay-blob-bundle\n```\n\n## Integration into the Relay API Server\n\n* Add the bundle to your `config/bundles.php` in front of `DbpRelayCoreBundle`:\n\n```php\n...\nDbp\\Relay\\BlobBundle\\DbpRelayBlobBundle::class =\u003e ['all' =\u003e true],\nDbp\\Relay\\CoreBundle\\DbpRelayCoreBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\nIf you were using the [DBP API Server Template](https://github.com/digital-blueprint/relay-server-template)\nas template for your Symfony application, then this should have already been generated for you.\n\n* Run `composer install` to clear caches\n\n## Configuration\n\nThe bundle has multiple configuration values that you can specify in your\napp, either by hard-coding it, or by referencing an environment variable.\n\nFor this create `config/packages/dbp_relay_blob.yaml` in the app with the following\ncontent:\n\n```yaml\ndbp_relay_blob:\n  database_url: %env(resolve:DATABASE_URL)%'\n  reporting_interval: \"0 11 * * MON\" # when notification cronjob should run\n  cleanup_interval: \"*/5 * * * *\" # when cleanup cronjob should run\n  file_integrity_checks: true # if file integrity checks should be performed periodically\n  integrity_check_interval: \"0 0 1 * *\" # when integrity check cronjob should run\n  bucket_size_check_interval: \"0 2 * * 1\" # when bucket size check cronjob should run\n  quota_warning_interval: \"0 7 * * *\" # when bucket quota should be checked and if needed warning emails should be sent\n  additional_auth: true # enable client credential flow\n  buckets:\n    test_bucket:\n      service: 'Dbp\\Relay\\BlobConnectorFilesystemBundle\\Service\\FilesystemService' # The path to a dbp relay blob connector service\n      internal_bucket_id: '019072b9-7736-7430-aabd-ad1bbeeebacf' # A given internal id for a bucket\n      bucket_id: 'test-bucket' # friendly name of the bucket thats also used for the request\n      key: '12345' # public key for signed request\n      quota: 500 # Max quota in MB\n      notify_when_quota_over: 70 # percent of quota when the bucket owner should be notified that the storage is running out\n      report_when_expiry_in: 'P30D' # duration of how much in advance a bucket owner or user should be warned about the deletion of files\n      bucket_owner: 'john@example.com' # Email who will be notified when quota is reached\n      link_expire_time: 'P7D' # Max expire time of sharelinks in ISO 8601\n      warn_quota: # Notification configuration how emails are sent when the quota is about to be reached\n        dsn: '%env(TUGRAZ_MAILER_TRANSPORT_DSN)%'\n        from: 'noreply@tugraz.at'\n        to: 'john@example.com'\n        subject: 'Blob Bucket Quota Warning'\n        html_template: 'emails/warn-quota.html.twig'\n      reporting: # Reporting configuration how emails are sent when files are about to expire\n        dsn: '%env(TUGRAZ_MAILER_TRANSPORT_DSN)%'\n        from: 'noreply@tugraz.at'\n        to: 'john@example.com' # this email is a fallback, if no email field of a file is set\n        subject: 'Blob file Deletion Report'\n        html_template: 'emails/reporting.html.twig'\n      integrity: # Integrity check configuration how emails are sent when file hash or metadata hash do not match with the saved file or metadata\n        dsn: '%env(TUGRAZ_MAILER_TRANSPORT_DSN)%'\n        from: 'noreply@tugraz.at'\n        to: 'john@example.com'\n        subject: 'Blob File Integrity Check Report'\n        html_template: 'emails/integrity.html.twig'\n      additional_types:\n        - generic_id_card: '%kernel.project_dir%/config/packages/schemas/relay-blob-bundle/test-bucket/generic_id_card.json'\n```\n\nFor more info on bundle configuration see \u003chttps://symfony.com/doc/current/bundles/configuration.html\u003e.\n\n## Development \u0026 Testing\n\n* Install dependencies: `composer install`\n* Run tests: `composer test`\n* Run linters: `composer run lint`\n* Run cs-fixer: `composer run cs-fix`\n\n## Bundle dependencies\n\nDon't forget you need to pull down your dependencies in your main application if you are installing packages in a bundle.\n\n```bash\n# updates and installs dependencies of dbp/relay-blob-bundle\ncomposer update dbp/relay-blob-bundle\n```\n\n## Scripts\n\n### Database migration\n\nRun this script to migrate the database. Run this script after installation of the bundle and\nafter every update to adapt the database to the new source code.\n\n```bash\nphp bin/console doctrine:migrations:migrate --em=dbp_relay_blob_bundle\n```\n\n## Error codes\n\nSee the [API documentation](doc/api.md).\n\n## CronJobs\n\n### Cleanup Cronjob\n\nThis cronjob is for cleanup purposes. It starts every hour and deletes old files.\n\n### Send Report Cronjob\n\nThis cronjob sends reports to given email addresses, or the bucket owner.\nIn these reports there are all files which are going to be deleted in the timeframe specified in the config. \nThe email address are attached to these files or there is a default in the config.\nThis cronjob starts every Monday at 9 o'clock in the Morning (UTC).\n\n### Quota Warning\n\nThis cronjob sends reports to the in `warn_quota` configured email.\nThis email lets the configured person know before the bucket space is used up.\nAn email gets sent after the bucket is filled to a certain percentage, configured with the option `notify_when_quota_over`.\nThe option `quota_warning_interval` indicates in which interval this should get checked.\n\n### Bucket Size Check\n\nThis cronjob sends reports to the in `bucket_size` configured email.\nThis 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.\nAn email is sent if some inconsistencies are detected.\nThe option `bucket_size_check_interval` indicates in which interval this should get checked.\n\n### Integrity Check\n\nThis cronjobs sends reports to the in `integrity` configured email.\nThis 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.\nAn email is sent if some inconsistencies are detected.\nThe option `integrity_check_interval` indicates in which interval this should get checked.\nThe option `file_integrity_checks` can be used to enable or disable the integrity checks.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-blueprint%2Frelay-blob-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigital-blueprint%2Frelay-blob-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-blueprint%2Frelay-blob-bundle/lists"}