定制 dgtl-one/kirby-chunky 二次开发

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

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

dgtl-one/kirby-chunky

Composer 安装命令:

composer require dgtl-one/kirby-chunky

包简介

Using Kirby Chunky, you can easily bypass the upload limits of your server or proxy and provide fast, secure, and resumable uploads using the tus protocol.

README 文档

README

Chunky Logo

Chunky – Large and resumable file uploads for Kirby CMS

Packagist Version Kirby Version Packagist PHP Version Packagist License

Chunky is a plugin for Kirby CMS that allows users to easily upload and manage very large files. With support for uploading files ranging from a few MB to multiple TB, Chunky provides a fast and secure way to transfer files of any size without the need to modify server settings or work around file upload limits imposed by hosting providers, proxies (like Cloudflare), firewalls, or CDNs.

One of the key features of Chunky is its support for resumable uploads, which allows users to resume an upload from anywhere inside the panel at a later time. This is particularly useful for transferring large files over slow or unreliable internet connections.

Chunky also extends all files sections automatically and fits seamlessly into the Kirby UI, making it easy for panel users to work with large files without any additional setup or configuration.

Under the hood, Chunky uses the tus protocol v1 and the official tus-js-library, ensuring compatibility with a wide range of web servers and hosting providers including NGINX, Apache, and Caddy. Chunky is compatible with PHP 7.2.5 and higher, and provides the option to configure your own chunk size inside your site's config.

Features:

■ Upload very large files from inside the Kirby Panel, ranging from a few MB to multiple TB in size.
■ Resumable uploads can be initiated at any point from within the Kirby Panel.
■ The file upload limits set by PHP.ini, proxy (like Cloudflare), firewall, or hosting provider can be bypassed.
■ Fast and secure uploads of any size are possible without modifying server settings.
■ The maximum available chunk size on the server is calculated automatically.
■ A custom chunk size can be configured within the site's config.
■ All file sections are automatically extended without the need to modify blueprints.
■ Deep integration of custom file-related hooks and compatibility with other file-related plugins.
■ Compatible with any web server and hosting provider, including NGINX, Apache, and Caddy.
■ Works seamlessly for Panel users and fits perfectly with the known Kirby Upload UI.

Browser support:

The Chunky plugin is built on top of the tus-js-client, which has been tested and is known to be compatible with a variety of web browsers. While it is likely that Chunky will also work in other browsers, this has not yet been confirmed. However, since the tus client only relies on Web Storage, XMLHttpRequest2, the File API, and the Blob API, it is expected that users who can access the Kirby Panel should also be able to use Chunky without issue.

■ Microsoft Edge 12+
■ Mozilla Firefox 14+
■ Google Chrome 20+
■ Safari 6+
■ Opera 12.1+
■ iOS 6.0+
■ Android 5.0+

How to use Chunky

Installing Chunky is a breeze. Simply add it to your Kirby CMS plugin folder using your preferred method, and you're all set. Chunky automatically enhances all upload functions in the Kirby Panel, without the need for any additional configurations in the blueprints. And if you decide you no longer want to use Chunky, just remove it from your plugin folder and everything will return to normal.

Installation

Download

Download and copy this repository to /site/plugins/chunky.

Git submodule

git submodule add https://github.com/dgtl-one/kirby-chunky.git site/plugins/chunky

Composer

composer require dgtl-one/kirby-chunky

Config Options

You can also define your own chunk size inside your config.php, however, this will be overridden if the value exceeds the limits defined in the PHP.ini or the limit of a proxy such as Cloudflare (100 MB). If possible, Chunky will automatically set the chunk size to 5 MB.

return [
    'dgtlone.kirby-chunky.chunk_size' => '5M', // shortcuts 'K', 'M', 'G' are supported
];

The ideal chunk size for resumable tus uploads will depend on a variety of factors, including the size of the file being uploaded, the bandwidth and latency of the network connection, and the capabilities of the server receiving the upload.

In general, it is a good idea to start with a chunk size of around 5 MB and then adjust based on the performance of the upload. Larger chunk sizes may be faster, but may also be more prone to errors if the connection is unstable. Smaller chunk sizes may be slower, but may be more reliable and allow for easier recovery if an error occurs.

Overall, the best chunk size will depend on the specific needs of the average file size of your site and the characteristics of the network environment in which it is being used.

Changelog

v1.0.1

  • Fixed an issue with files having templates (#1)
  • Updated dependencies

v1.0.0

  • Initial commit

What is TUS?

The TUS protocol (short for "The Upload Server Protocol") is a reliable and popular method for uploading large files over the internet. It works by allowing the client to send multiple small chunks of data to the server, rather than sending the entire file in one go. This makes it possible to resume an interrupted upload from where it left off, as well as to perform other features such as file concatenation, modification, and deletion. TUS is an open protocol, meaning that it is freely available for anyone. It is widely used in a variety of applications, including file sharing platforms and online backup services.

Get more information at tus.io.

License

Chunky is released under the MIT License.

dgtl-one/kirby-chunky 适用场景与选型建议

dgtl-one/kirby-chunky 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 34 次下载、GitHub Stars 达 42, 最近一次更新时间为 2022 年 12 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 dgtl-one/kirby-chunky 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dgtl-one/kirby-chunky 我们能提供哪些服务?
定制开发 / 二次开发

基于 dgtl-one/kirby-chunky 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 34
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 42
  • 点击次数: 28
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 42
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-17