PHPackages                             mehrdad-dadkhah/chunks-uploader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. mehrdad-dadkhah/chunks-uploader

ActiveLibrary[File &amp; Storage](/categories/file-storage)

mehrdad-dadkhah/chunks-uploader
===============================

upload chunks file. use to upload big files

1.4.3(8y ago)81.3k3[1 issues](https://github.com/Mehrdad-Dadkhah/chunks-uploader/issues)1GPL-3.0-onlyPHPPHP &gt;=5.5

Since Sep 3Pushed 8y ago2 watchersCompare

[ Source](https://github.com/Mehrdad-Dadkhah/chunks-uploader)[ Packagist](https://packagist.org/packages/mehrdad-dadkhah/chunks-uploader)[ Docs](https://github.com/Mehrdad-Dadkhah/chunks-uploader)[ RSS](/packages/mehrdad-dadkhah-chunks-uploader/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (22)Used By (1)

chunks-uploader
===============

[](#chunks-uploader)

[![Software License](https://camo.githubusercontent.com/e1514dd3f2095dbf68a0008ae62a631142953ad2e86aa94c504343f2c2c191da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/38e8cbbf2f248aa01642305217514d9db82a5095fa14ee2cebdfb6ee22fdbe29/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4d6568726461642d4461646b6861682f6368756e6b732d75706c6f616465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mehrdad-dadkhah/chunks-uploader)[![Packagist](https://camo.githubusercontent.com/bb70a091c19518b4e82f39d7649af8e917ae1ec91c0113541ffe08655d047ad3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4d6568726461642d4461646b6861682f6368756e6b732d75706c6f616465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Mehrdad-Dadkhah/chunks-uploader)

Uploader to uplaod chunks of a file and combine them use to upload big files.

Installation
------------

[](#installation)

```
composer require mehrdad-dadkhah/chunks-uploader

```

Usage
-----

[](#usage)

```
use MehrdadDadkhah\Video\ChunksUploader;

$uploadHandeler = new ChunksUploader();
$uploadHandeler->setMainFileName('myFile.mp4') //main file name
            ->setFileTotalSize($_REQUEST['totalfilesize']) //size of main file (big file)
            ->setInputName('file') //your form input file name
            ->setChunksFolderPath('path-to-chunks-folder') //path to folder for upload chunks files
            ->setUniqueIdentifier('unique-id'); // set unique identifier for each upload (for example user id + time or ...) a unique indentifier per each upload
```

to upload your chunks:

```
$uploadResult = $uploadHandeler->uploadChunk('name-of-chunk-or-chunk-number'); //should be a sortable name
```

And when all chunks upload:

```
$uploadResult = $uploadHandeler->setUploadDirectory('path-to-upload-directory') //main directry path to upload (combine chunks here)
			->finishUpload();
```

Custome file name
-----------------

[](#custome-file-name)

If want to set output file name try use setUploadName() function before fire finishUpload() function:

```
$uploadHandeler->setUploadName('my-name.mp4');
```

If don't set name your file name be with structur YYYY\_m\_d\_hashname.mp4 and in final resutl generated name will be return.

Check and generate output directory
-----------------------------------

[](#check-and-generate-output-directory)

If want to script make output directory automatically just set it:

```
$uploadHandeler->checkAndGenerateOutputDirectory();
```

Temp directory
--------------

[](#temp-directory)

If want to generate file in a temp directory and then move to main upload directory you can use setTempDirectory() function:

```
$uploadHandeler->setTempDirectory('path-to-temp');
```

Max upload size
---------------

[](#max-upload-size)

ChunksUploader calculate uploaded file size (sum of chunks) and compare with upload\_max\_filesize ini config. If want to stop bigger file at first request for better ux can pass total main file size in bytes:

```
$uploadHandeler->setVideoTotalSize(213456);
```

And can overwrite upload\_max\_filesize by:

```
$uploadHandeler->setMaxUploadSize(213456);
```

License
-------

[](#license)

hls-video-generater is licensed under the [GPLv3 License](http://opensource.org/licenses/GPL).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Recently: every ~31 days

Total

21

Last Release

3074d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3860685?v=4)[Mehrdad-Dadkhah](/maintainers/Mehrdad-Dadkhah)[@Mehrdad-Dadkhah](https://github.com/Mehrdad-Dadkhah)

---

Top Contributors

[![Mehrdad-Dadkhah](https://avatars.githubusercontent.com/u/3860685?v=4)](https://github.com/Mehrdad-Dadkhah "Mehrdad-Dadkhah (26 commits)")[![fzerorubigd](https://avatars.githubusercontent.com/u/935155?v=4)](https://github.com/fzerorubigd "fzerorubigd (1 commits)")

---

Tags

videofileuploaderchunksbig\_filefine\_uploadertus\_uploaderflowjs\_uploaderserver\_uploader

### Embed Badge

![Health badge](/badges/mehrdad-dadkhah-chunks-uploader/health.svg)

```
[![Health](https://phpackages.com/badges/mehrdad-dadkhah-chunks-uploader/health.svg)](https://phpackages.com/packages/mehrdad-dadkhah-chunks-uploader)
```

###  Alternatives

[fof/upload

The file upload extension for the Flarum forum with insane intelligence.

190185.4k17](/packages/fof-upload)[transloadit/php-sdk

Transloadit SDK

61408.9k2](/packages/transloadit-php-sdk)[digital-creative/nova-filepond

A Nova field for uploading File, Image and Video using filepond.

5570.0k1](/packages/digital-creative-nova-filepond)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
