PHPackages                             carriongrow/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. carriongrow/uploader

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

carriongrow/uploader
====================

Package of uploads

v1.5(1y ago)0233MITPHPPHP &gt;=8.1

Since Nov 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AnatolySnegovskiy/uploader)[ Packagist](https://packagist.org/packages/carriongrow/uploader)[ RSS](/packages/carriongrow-uploader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (40)Used By (0)

Uploader
========

[](#uploader)

An Object-Oriented library to upload files

composer require carriongrow/uploader

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

[](#installation)

```
$ composer require carriongrow/uploader
```

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

[](#basic-usage)

```
//
//
//

        $upload = new Upload();
        $newVideoConfig = new VideoConfig();
        $newVideoConfig->setMaxBitrate(100000);

        ## Default set config in collection ##
        $upload->getConfigs()->set('video_test', $newVideoConfig);

        ## BUILDER ##
        $upload->getConfigs()
            ->new('test')->image() //new it's, set - input name field
            ->setUploadPath(__DIR__ . '/download') // path saved files, default: /yourProject/uploaded
            ->setFileName('newName') // the new name, if omitted, will be saved with the original name
            ->setMaxSize(1000) // max 10MB
            ->setOverwrite(true)// Overwrite file
            ->save()

            ->new('test_text')->other()
            ->setAllowedTypes('doc|txt')
            ->save();

        $result = $upload->uploadAll();
        $testText = $result->get('test_text');
        $textPath = $testText->getFilePath();

        foreach ($result->getImages() as $image) {
            $a[] =
                [
                    $image->getName(),
                    $image->getRawName(),
                    $image->getWidth(),
                    $image->getHeight(),
                    $image->getSize()
                ];
            $image->toArray();
        }
```

### Custom Config Class

[](#custom-config-class)

```
## The handler of the uploaded file ##
class HandlerCustom implements UploadHandlerInterface
{
    /** @var string */
    protected $tempPath;
    /** @var Config */
    protected $config;

    public function __construct(Config $config)
    {
        $this->config = $config;
    }

    /**
     * @throws Exception
     */
    public function behave(array $file)
    {
        $file['tmp_name'];
        $file['size'];
        $file['name'];
        $file['mimes'];
        // your object checks and fillings
    }
}

## CONFIG CLASS ##
class ConfigCustom extends Config
{
    /** @var string */
    private $string = '';
    /** @var string */
    private $string2 = '';

    /** @var UploadHandlerInterface */
    protected $handler;

    public function __construct()
    {
        $this->handler = new HandlerCustom($this);
    }
}

## USE ##
$upload = new Upload();
$customConfig = new ConfigCustom();
$upload->getConfigs()->set('custom_config', $customConfig);
$upload->uploadAll();
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

Established project with proven stability

 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 ~29 days

Recently: every ~120 days

Total

39

Last Release

558d ago

PHP version history (3 changes)v1.0PHP &gt;=7.3.0

v1.1.4PHP &gt;=7.2.0

v1.5PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/106a795433454f7c53097b5332eaed9dcd7426c81fca8590cd12a0f5f6b7fe49?d=identicon)[AnatoliiSnegovskii](/maintainers/AnatoliiSnegovskii)

---

Top Contributors

[![AnatolySnegovskiy](https://avatars.githubusercontent.com/u/11618162?v=4)](https://github.com/AnatolySnegovskiy "AnatolySnegovskiy (53 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/carriongrow-uploader/health.svg)

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

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

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

PHPackages © 2026

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