dbp/relay-blob-library
最新稳定版本:v0.3.10
Composer 安装命令:
composer require dbp/relay-blob-library
包简介
PHP helper library for interaction with the dbp/relay-blob-bundle.
README 文档
README
GitHub | Packagist | Changelog
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());
- For the whole example PHP code, see BlobApiExamples.php
Integration into a Symfony bundle
Soon to come.
统计信息
- 总下载量: 40.56k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0-or-later
- 更新时间: 2023-07-25