stadly/file-waiter-flysystem

FileWaiter 的 Flysystem 文件适配器。

v1.0.0 2021-09-10 10:46 UTC

This package is auto-updated.

Last update: 2024-09-10 17:23:10 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Flysystem文件适配器,用于FileWaiter

安装

通过 Composer

$ composer require stadly/file-waiter-flysystem

用法

use Stadly\FileWaiter\Adapter\Flysystem;
use Stadly\FileWaiter\File;
use Stadly\FileWaiter\Waiter;

$flysystem = new \League\Flysystem\Filesystem($adapter);    // Any Flysystem adapter.
$filePath = '/path/to/file/in/flysystem';

$streamFactory = new \GuzzleHttp\Psr7\HttpFactory();        // Any PSR-17 compatible stream factory.
$file = new File(new Flysystem($flysystem, $filePath, $streamFactory));

$responseFactory = new \GuzzleHttp\Psr7\HttpFactory();      // Any PSR-17 compatible response factory.
$waiter = new Waiter($file, $responseFactory);

// Serve the file stored in Flysystem using FileWaiter.

变更日志

有关最近更改的更多信息,请参阅变更日志

测试

$ composer test

贡献

有关详细信息,请参阅贡献指南行为准则

安全性

如果您发现任何与安全性相关的问题,请通过[email protected]发送电子邮件,而不是使用问题跟踪器。

鸣谢

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅许可证