PHPackages                             hamed/php-chunk-file-upload - 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. hamed/php-chunk-file-upload

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

hamed/php-chunk-file-upload
===========================

A PHP package for handling the chunk file uploads.

1.2.3(4y ago)2742MITPHPPHP ^7.3|^8.0

Since Dec 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hamedgasemi200/php-chunk-file-upload)[ Packagist](https://packagist.org/packages/hamed/php-chunk-file-upload)[ Docs](https://tridectet.ir)[ RSS](/packages/hamed-php-chunk-file-upload/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Php Chunk File Upload
=====================

[](#php-chunk-file-upload)

A lightweight PHP package for handling the chunk file upload. Compatible with almost all the versions of Laravel.

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

[](#installation)

You can simply install the package using the composer.

```
composer require hamed/php-chunk-file-upload

```

Usage
-----

[](#usage)

To use this package, first, make an object of the `Uploader` class, and then, run the "Upload" method.

#### Constructor

[](#constructor)

The constructor, take 2 arbitrary keys and values to config the package.

- `max_upload` =&gt; Bytes of the max upload; if user tries to upload more than max\_upload (max\_upload &lt; file\_size), am error will be returned.
- `chunk_folder` =&gt; The folder which all the chunk files will be placed in.

#### Upload

[](#upload)

The `Upload` method, takes the following keys and values

- `chunk_number` =&gt; The number of the chunk. It has to be increased for each of the chnuk files in order.
- `chunks_count` =&gt; Total number of the chunk files.
- `chunk_path` =&gt; The path of the incoming chunk file
- `file_size` =&gt; The size of the mail file.
- `file_name` =&gt; The name of the final file

##### Method returns

[](#method-returns)

The `Upload` method returns the following

- If not the last chunk file were uploaded fine, it will return a `float` representing the percentage of the upload.
- If all the chunks were uploaded fine, it will return a `string` representing the path of the final file.

Example
-------

[](#example)

Here is an example of resumable js library requests.

```
use Hamed\ChunkFile\Uploader;

...

try {
   $file_path = (new Uploader())->Upload([
      'chunk_path' => $request->file('file')->getRealPath(),
      'file_name' => $request->resumableFilename,
      'chunk_number' => $request->resumableChunkNumber,
      'chunks_count' => $request->resumableTotalChunks,
      'file_size' => $request->resumableTotalSize,
      'max_upload' => 5 * pow(10, 6),
      'errors' => ['max_upload' => "Low Space"],
   ]);
} catch (Exception $exception) {
   return response($exception->getMessage(), 403);
}

if (is_string($file_path)) echo("File path: $file_path"); // Upload has finished. You can move the file.
else echo("Progress: {$file_path}%") // Chunk has been uploaded. Print the percentage of the upload ;)

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

7

Last Release

1600d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33207312?v=4)[Mr. H](/maintainers/hamedgasemi200)[@hamedgasemi200](https://github.com/hamedgasemi200)

---

Top Contributors

[![hamedgasemi200](https://avatars.githubusercontent.com/u/33207312?v=4)](https://github.com/hamedgasemi200 "hamedgasemi200 (22 commits)")

---

Tags

chunk-uploadlaravelphpfileuploadchunk

### Embed Badge

![Health badge](/badges/hamed-php-chunk-file-upload/health.svg)

```
[![Health](https://phpackages.com/badges/hamed-php-chunk-file-upload/health.svg)](https://phpackages.com/packages/hamed-php-chunk-file-upload)
```

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[blueimp/jquery-file-upload

File Upload widget for jQuery.

141.5M18](/packages/blueimp-jquery-file-upload)[recca0120/upload

Ajax Upload Large File Support jQuery-File-Upload, FileApi, Plupload, For framework Laravel

816.5k](/packages/recca0120-upload)[jobtech/laravel-chunky

A laravel manager to handle chunked files upload

4411.3k](/packages/jobtech-laravel-chunky)[torann/mediasort

Attachment manager for Laravel.

2012.5k](/packages/torann-mediasort)[erlandmuchasaj/laravel-file-uploader

A simple package to help you easily upload files to your laravel project.

128.7k](/packages/erlandmuchasaj-laravel-file-uploader)

PHPackages © 2026

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