PHPackages                             gelatocloud/flow-php-server - 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. gelatocloud/flow-php-server

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

gelatocloud/flow-php-server
===========================

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

v0.2.1(12y ago)02.3kMITPHP

Since Oct 4Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Toptunenko/flow-php-server)[ Packagist](https://packagist.org/packages/gelatocloud/flow-php-server)[ RSS](/packages/gelatocloud-flow-php-server/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

flow.js php server [![Build Status](https://camo.githubusercontent.com/75f82c0ff573149e36dded528f7406338eca32aed3e8b19ce9e136c68eb74e33/68747470733a2f2f7472617669732d63692e6f72672f666c6f776a732f666c6f772d7068702d7365727665722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/flowjs/flow-php-server) [![Coverage Status](https://camo.githubusercontent.com/940701149833b1ac9cee30d6053b5b1d7cfb337d75cddfca0ed1bb33f630c2f9/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f666c6f776a732f666c6f772d7068702d7365727665722f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/flowjs/flow-php-server?branch=master)
==============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#flowjs-php-server--)

PHP library for handling chunk uploads. Library contains helper methods for:

- Testing if uploaded file chunk exists.
- Validating file chunk
- Creating separate chunks folder
- Validating uploaded chunks
- Merging all chunks to a single file

This library is compatible with HTML5 file upload library:

Basic Usage
-----------

[](#basic-usage)

```
if (\Flow\Basic::save('./final_file_destination', './chunks_temp_folder')) {
  // file saved successfully and can be accessed at './final_file_destination'
} else {
  // This is not a final chunk or request is invalid, continue to upload.
}
```

Make sure that `./chunks_temp_folder` path exists. All chunks will be save in this temporary folder.

If you are stuck with this example, please read this issue: [How to use the flow-php-server](https://github.com/flowjs/flow-php-server/issues/3#issuecomment-46979467)

Advanced Usage
--------------

[](#advanced-usage)

```
$config = new \Flow\Config();
$config->setTempDir('./chunks_temp_folder');
$file = new \Flow\File($config);

if ($_SERVER['REQUEST_METHOD'] === 'GET') {
    if ($file->checkChunk()) {
        header("HTTP/1.1 200 Ok");
    } else {
        header("HTTP/1.1 404 Not Found");
        return ;
    }
} else {
  if ($file->validateChunk()) {
      $file->saveChunk();
  } else {
      // error, invalid chunk upload request, retry
      header("HTTP/1.1 400 Bad Request");
      return ;
  }
}
if ($file->validateFile() && $file->save('./final_file_name')) {
    // File upload was completed
} else {
    // This is not a final chunk, continue to upload
}
```

Delete unfinished files
-----------------------

[](#delete-unfinished-files)

For this you should setup cron, which would check each chunk upload time. If chunk is uploaded long time ago, then chunk should be deleted.

Helper method for checking this:

```
\Flow\Uploader::pruneChunks('./chunks_folder');
```

Cron task can be avoided by using random function execution.

```
if (1 == mt_rand(1, 100)) {
    \Flow\Uploader::pruneChunks('./chunks_folder');
}
```

Contribution
------------

[](#contribution)

Your participation in development is very welcome!

To ensure consistency throughout the source code, keep these rules in mind as you are working:

- All features or bug fixes must be tested by one or more specs.
- Your code should follow [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) coding style guide

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.2% 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 ~13 days

Total

4

Last Release

4560d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/555a98f2644b8a811631ad40e286f5720bd53b4a1ed76d027d37976e35ae61a8?d=identicon)[Toptunenko](/maintainers/Toptunenko)

---

Top Contributors

[![AidasK](https://avatars.githubusercontent.com/u/2088484?v=4)](https://github.com/AidasK "AidasK (50 commits)")[![Toptunenko](https://avatars.githubusercontent.com/u/10399000?v=4)](https://github.com/Toptunenko "Toptunenko (2 commits)")

---

Tags

uploadflowfile-uploadresumable.jsresumablehtml5 file uploadchunksflow.js

### Embed Badge

![Health badge](/badges/gelatocloud-flow-php-server/health.svg)

```
[![Health](https://phpackages.com/badges/gelatocloud-flow-php-server/health.svg)](https://phpackages.com/packages/gelatocloud-flow-php-server)
```

###  Alternatives

[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[coffeecode/uploader

It is a easy PHP upload manager for images, files and media in your application

17149.7k3](/packages/coffeecode-uploader)[iphp/filestore-bundle

Upload files for doctrine entities in symfony 2 project

50143.2k2](/packages/iphp-filestore-bundle)[enyo/dropzone

Handles drag and drop of files for you.

101.9M31](/packages/enyo-dropzone)[kingofcode/laravel-uploadable

Laravel Uploadable trait to automatically upload images and files with minimum configuration

286.4k](/packages/kingofcode-laravel-uploadable)[wester/chunk-upload

Handle chunked uploads with local and ftp drivers simply in PHP with advanced validation features and localization.

1711.3k](/packages/wester-chunk-upload)

PHPackages © 2026

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