定制 ntzm/tusk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ntzm/tusk

Composer 安装命令:

composer require ntzm/tusk

包简介

PSR-7 compatible tus server for PHP

关键字:

README 文档

README

PSR-7 compatible tus server for PHP

Available storage drivers

S3

Stores files in S3

$storage = new Tusk\Storage\S3Storage(new Aws\S3\S3Client([
    'version' => '2006-03-01',
    'region' => 'eu-west-1',
]), 'bucket-name');

See the documentation for PHP AWS SDK for more information.

ID Generation

By default, file IDs are created using the RandomHexIdGenerator, which should give you 32-character IDs that look like 69ed96b70ab30c8f046e79b74faf481b. If you'd like to change how this works, you can inject a custom class that implements IdGenerator.

Location Generation

When a file upload begins, the server returns a URL that the client can continue to send data to. By default this is whatever the POST URL is, plus the file ID. This is handled by the RelativeLocationGenerator.

For example, if the POST endpoint's URL was /files, the file location would be files/<id>.

If you'd like to change this, you can inject a custom class that implements LocationGenerator.

Events

Tusk emits events when certain things happen during a file's lifecycle. You can hook into these with any PSR-14 compatible event dispatcher implementation.

UploadComplete

Tusk\Event\UploadComplete is fired when a file has been uploaded completely. It has one method, fileId() which can be called to get the file's ID.

Compatibility

Tusk is compatible with tus 1.0.0 and the following extensions:

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固