PHPackages                             onix-systems-php/hyperf-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. onix-systems-php/hyperf-file-upload

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

onix-systems-php/hyperf-file-upload
===================================

An extension to maintain file upload and assignation

v1.3.0(1y ago)12.6k2MITPHPPHP &gt;=8.1

Since Dec 23Pushed 1y ago3 watchersCompare

[ Source](https://github.com/onix-systems-php/hyperf-file-upload)[ Packagist](https://packagist.org/packages/onix-systems-php/hyperf-file-upload)[ RSS](/packages/onix-systems-php-hyperf-file-upload/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (17)Versions (15)Used By (2)

Hyperf-file-upload component
============================

[](#hyperf-file-upload-component)

Includes the following classes:

- Model:
    - File;
    - FileRelations trait.
- Repository:
    - FileRepository.
- Service:
    - AddExternalFileService;
    - AddFileService;
    - ClearUnusedDeletedFilesService;
    - DownloadFileService.

Install:

```
composer require onix-systems-php/hyperf-file-upload
```

Publish config and database migrations:

```
php bin/hyperf.php vendor:publish onix-systems-php/hyperf-file-upload
```

Fill `file_upload` config with file upload configuration, following existing examples.

Add `$fileRelations` config and `FileRelations` trait to models you want assign files to:

```
use FileRelations;

public $fileRelations = [
    'avatar' => [
        'limit' => 1,
        'required' => false,
        'mimeTypes' => [image/png', 'image/jpg', 'image/jpeg', 'image/bmp'],
        'presets' => [
            '150x150' => ['fit' => [150, 150]],
            '250x250' => ['fit' => [250, 250]],
        ],
    ],
    'documents' => [
        'limit' => null,
        'required' => false,
        'mimeTypes' => ['application/pdf'],
    ],
];
```

Methods you might need to redefine in `FileRelations` trait:

- `getAuth`: this method should return active user
- `processFileActions`: if you defined new extra actions in config, you'll need to define action's login in this method

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance41

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 57.7% 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 ~63 days

Recently: every ~180 days

Total

13

Last Release

486d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

v1.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e1c2e991197c9603eb160eb27e1be423eb683ee2eed293288993936444c20bb?d=identicon)[onix-systems-php](/maintainers/onix-systems-php)

---

Top Contributors

[![maksympron](https://avatars.githubusercontent.com/u/159782847?v=4)](https://github.com/maksympron "maksympron (15 commits)")[![vmikhav](https://avatars.githubusercontent.com/u/11061723?v=4)](https://github.com/vmikhav "vmikhav (6 commits)")[![DenisOnix](https://avatars.githubusercontent.com/u/90691028?v=4)](https://github.com/DenisOnix "DenisOnix (3 commits)")[![alexsyvolap](https://avatars.githubusercontent.com/u/80973788?v=4)](https://github.com/alexsyvolap "alexsyvolap (1 commits)")[![serhiimoroko](https://avatars.githubusercontent.com/u/109082130?v=4)](https://github.com/serhiimoroko "serhiimoroko (1 commits)")

---

Tags

phphyperf

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/onix-systems-php-hyperf-file-upload/health.svg)

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

PHPackages © 2026

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