PHPackages                             rezident/yii2-attach-file - 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. rezident/yii2-attach-file

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

rezident/yii2-attach-file
=========================

This extension for yii2 allows you to attach different uploaded files to models and to represent ones in the different views

0.9.14(9y ago)032MITPHP

Since Apr 8Pushed 9y agoCompare

[ Source](https://github.com/rezident/yii2-attach-file)[ Packagist](https://packagist.org/packages/rezident/yii2-attach-file)[ RSS](/packages/rezident-yii2-attach-file/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (2)Versions (18)Used By (0)

yii2-attach-file
================

[](#yii2-attach-file)

This extension for yii2 allows you to attach different uploaded files to models. **The extension is not done! It does not work! Version 0.9 for testing in the real project.**

Configuration
-------------

[](#configuration)

To use this extension, simply add the following code in your application configuration:

```
return [
    //.....
    'modules' => [
        //.....
        'attach_file' => [
            'class' => rezident\attachfile\AttachFileModule::class,
            'originalsPath' => '@app/files/originals',
            'viewsPath' => '@app/files/views',
            'webPath' => '@app/files/views'
        ]
    ]
];
```

Usage
-----

[](#usage)

### Adding behavior to the model

[](#adding-behavior-to-the-model)

To adding behavior to the model you have to

```
public function behaviors()
{
    return [
        'specified' => [
            'class' => rezident\attachfile\behaviors\AttachFileBehavior::class,
            'modelKey' => 'specified' // If it is not specified, will be used the short name of the model class
        ]
    ];
}

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

15

Last Release

3358d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/35a3eb31f74a417ee93f44961f6e1c43b95821ddb977d6310f289f2da14724f8?d=identicon)[rezident](/maintainers/rezident)

### Embed Badge

![Health badge](/badges/rezident-yii2-attach-file/health.svg)

```
[![Health](https://phpackages.com/badges/rezident-yii2-attach-file/health.svg)](https://phpackages.com/packages/rezident-yii2-attach-file)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[mihaildev/yii2-elfinder

Yii2 ElFinder

170675.9k54](/packages/mihaildev-yii2-elfinder)[fedemotta/yii2-aws-sdk

This extension provides the AWS SDK integration for the Yii2 framework

14443.7k2](/packages/fedemotta-yii2-aws-sdk)

PHPackages © 2026

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