PHPackages                             hadimodarres/uploader\_service - 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. hadimodarres/uploader\_service

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

hadimodarres/uploader\_service
==============================

S3 uploader service

v1.0.1(6y ago)022PHPPHP ^7.2

Since Aug 7Pushed 6y ago2 watchersCompare

[ Source](https://github.com/HadiModarres/s3_uploader_service)[ Packagist](https://packagist.org/packages/hadimodarres/uploader_service)[ RSS](/packages/hadimodarres-uploader-service/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Uploader Service
================

[](#uploader-service)

This piece of software can be used to recursively scan a folder for large files and upload them to an AWS S3 bucket. Optionally files can also be deleted after successfully uploaded.

Installation
============

[](#installation)

As composer package
-------------------

[](#as-composer-package)

The software can be installed using [Composer](https://getcomposer.org) as dependency package.

```
composer require hadimodarres/uploader_service
```

The package will be installed in `vendor/hadimodarres/uploader_service`.

Download
--------

[](#download)

Alternative you can directly clone the repository or download it as a ZIP file.

```
git clone https://github.com/HadiModarres/uploader_service.git
```

After that you would still need to install all of it's dependencies.

```
cd uploader_service
composer install
```

Usage
=====

[](#usage)

Programmatic usage
------------------

[](#programmatic-usage)

```
require_once 'vendor/autoload.php';

$config = ( new \UploaderService\Config\Config() )
    ->setPath( '/absolute/path/to/folder/to/be/processed' )
    ->setSizeThreshold( '1k' )
    ->setS3Region( 'eu-west-1' )
    ->setS3Bucket( 'your-bucket' )
    ->setS3Key( 'your-key' )
    ->setS3Secret( 'your-secret' )
    ->setDelete( true ); // pass false if you don't want files to be deleted

$uploader = new \UploaderService\Service\Uploader( $config );
$uploader->scan(); // scan files
$uploader->upload(); // upload scaned files
```

If you need to re-scan or re-upload files using the same configuration you can save on re-creating the uploader instance. The only thing you **need** to do is call:

```
$uploader->clear(); // clear queue of scanned files
```

### Console output

[](#console-output)

If you are running the above code in the terminal you might want to see some fancy output of what is going on.
You can achieve this with the help of [Symfony Console](https://symfony.com/doc/current/components/console.html).

```
$uploader = new \UploaderService\Service\Uploader(

    $config,
    new \UploaderService\Service\Uploader\Output( new \Symfony\Component\Console\Output\ConsoleOutput(), null, true )

);
```

### Logging

[](#logging)

You can also write logs.
Just pass a `Psr\Log\LoggerInterface` as the second argument of the `UploaderService\Service\Uploader\Output` class.

Only the following 3 log levels are used:

- `debug` - For trivial stuff like operation announcements and statistics.
- `info` - For successful operations like file uploads and deletions.
- `error` - For exceptions.

```
$uploader = new \UploaderService\Service\Uploader(

    $config,
    new \UploaderService\Service\Uploader\Output(

        new \Symfony\Component\Console\Output\ConsoleOutput(),
        ( new \Monolog\Logger( 'upload' ) )
            ->pushHandler( new \Monolog\Handler\StreamHandler( 'debug.log', \Monolog\Logger::DEBUG ) ),
        true

    )

);
```

CLI usage
---------

[](#cli-usage)

The package comes with a ready-to-use CLI executable located at `bin/cli.php`.
You can run it with `php bin/cli.php upload ..` or even directly `./bin/cli.php upload ..`.

You can specify values for all of the configuration options right in the command line.
For more info and available options run:

```
./bin/cli.php upload --help
```

Custom CLI
==========

[](#custom-cli)

If you need to use the package in the terminal, but don't want to use the provided `bin/cli.php` you can build your own [Symfony Console](https://symfony.com/doc/current/components/console.html) compatible CLI.

```
require_once 'vendor/autoload.php';

$app = new \Symfony\Component\Console\Application();

$app->add( new \UploaderService\Command\Upload() );

// or also pass config:
//
// $config = ( new \UploaderService\Config\Config() )
//     ->setPath( '/absolute/path/to/folder/to/be/processed' );
//
// $app->add( new \UploaderService\Command\Upload( $config ) );

$app->run();
```

The `\UploaderService\Command\Upload()` command will do an automatic merge of the configuration with options specified via the command line. This means that you can pass incomplete config and have the rest configured via the terminal.

Keep in mind that options specified via terminal will override ones specified programmatically.

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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

2

Last Release

2519d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d19fd78c717e55b5e5cd750fa075b3c776c27f39c9f7c7414c4666d4b87f929d?d=identicon)[TonyBogdanov](/maintainers/TonyBogdanov)

---

Top Contributors

[![HadiModarres](https://avatars.githubusercontent.com/u/9566334?v=4)](https://github.com/HadiModarres "HadiModarres (1 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15311.8M36](/packages/magento-magento2-functional-testing-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M524](/packages/shopware-core)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54642.4k4](/packages/jolicode-castor)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)

PHPackages © 2026

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