Download the PHP package justinholtweb/craft-chunky without Composer

On this page you can find all versions of the php package justinholtweb/craft-chunky. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-chunky

Chunky

Uploads too big for your server, in pieces small enough for it.

A file is as big as it is. Every hop between the browser and PHP has its own opinion about how big one request may be — upload_max_filesize, post_max_size, nginx's client_max_body_size, a CDN's body cap, a load balancer's timeout — and the smallest of those opinions is the real limit on what anybody can upload. Raising them all is somebody else's server, somebody else's plan, and sometimes nobody's to raise at all.

Chunky does not raise any of them. It makes them irrelevant, by never sending a request larger than the smallest one.

Free. Craft 5.3+, PHP 8.2+. No build step, no runtime dependencies, no outbound requests, no third-party service.

Chunky is the successor to sebastianlenz/craft-chunked-uploads, which was abandoned. It is not a fork — it is a fresh implementation against Craft 5, and it fixes that plugin's best-known limitation: it works everywhere in the control panel, not just on the Assets screen.

Install

That is the whole setup. Large uploads in the control panel start arriving in 4 MB pieces immediately.

How it works

Craft already ships jQuery File Upload, and jQuery File Upload has supported Content-Range chunking for a decade. Craft simply never turns it on.

So Chunky is not a new uploader. It decorates the one Craft already builds, and it decides per file:

The file is… What happens
at or under the chunk size posted whole to Craft's own assets/upload, untouched
larger than the chunk size sliced into Content-Range requests, reassembled by Chunky, then handed to Craft

That gate is the whole safety story. A bug in Chunky can only affect uploads that were going to be rejected anyway.

On the server, each chunk is written straight into a .part file at the offset it claims, so a 1 GB upload needs 1 GB of scratch space rather than two copies of it. The response to an unfinished upload carries Range: 0-<last byte held>, which is how the browser knows where it stands — and what makes resuming after a dropped connection land in the right place instead of writing the same bytes twice into the middle of the file.

Where it works

It deliberately leaves user photos, site images, and other plugins' upload actions alone.

What it adds beyond chunking

It says no early. A file with an extension Craft will not accept, or one past the configured maximum, is refused on the first chunk. Twenty seconds of somebody's time, not forty minutes.

It retries. A chunk that fails for a reason that might not happen twice — a dropped connection, a timeout, a 502 from a proxy — is retried, with a doubling delay, from the offset the server reports rather than the one the browser assumed. A 4xx is Craft saying no on purpose and is never retried.

It tells you when it cannot work. The settings screen reads the limits it can see and says plainly which ones the chunk size clears — and names the ones no PHP process can read (client_max_body_size, LimitRequestBody, a CDN's cap), because those reject a chunk before Craft is involved, which means an empty log and a bare 413 in the browser.

It cleans up after itself. A browser tab closed mid-upload leaves a partial file behind. Craft's garbage collection sweeps them; php craft chunky/partials says what is on disk and php craft chunky/partials/cleanup sweeps on demand.

Settings

Settings → Plugins → Chunky, or config/chunky.php:

See Configuration for the full list.

Requirements

Documentation

justinholt.com/plugins/craft-chunky/docs

Licence

The Craft License. See LICENSE.md. Chunky is free: no editions, no licence key, and no licensing code in the plugin.


All versions of craft-chunky with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-mbstring Version *
craftcms/cms Version ^5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package justinholtweb/craft-chunky contains the following files

Loading the files please wait ...