mrubiosan/flysystem-url

此包已被弃用,不再维护。未建议替代包。

从云服务提供商(如 Aws S3 和 Azure Blob)生成 Flysystem URL

v1.0.0 2019-04-03 03:04 UTC

This package is auto-updated.

Last update: 2021-10-01 00:17:51 UTC


README

Build Status Maintainability Test Coverage

扩展 Flysystem 适配器以包括 URL 生成方法。

支持

  • AWS S3(以及具有 S3 兼容 API 的提供商)
  • Azure Blob Storage
  • Google Cloud Storage

使用方法

$s3Client = new \Aws\S3\S3Client([//AWS client config...]);
$urlS3Adapter = new \Mrubiosan\FlyUrl\Adapter\UrlAwsS3Adapter($s3Client, 'mybucket');
$urlFilesystem = new \Mrubiosan\FlyUrl\Filesystem\UrlFilesystem($urlS3Adapter);

echo $urlFilesystem->getUrl('my/s3/file');

可用的适配器

  • Mrubiosan\FlyUrl\Adapter\UrlAwsS3Adapter
  • Mrubiosan\FlyUrl\Adapter\UrlAzureBlobStorageAdapter
  • Mrubiosan\FlyUrl\Adapter\UrlGoogleStorageAdapter