PHPackages                             slawap/yii2-uploadcare - 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. slawap/yii2-uploadcare

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

slawap/yii2-uploadcare
======================

Yii2 wrapper for uploadcare service

0.2.5(8y ago)03MITPHP

Since Oct 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/slawap/yii2-uploadcare)[ Packagist](https://packagist.org/packages/slawap/yii2-uploadcare)[ RSS](/packages/slawap-yii2-uploadcare/feed)WikiDiscussions master Synced yesterday

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

Yii2 wrapper for Uploadcare PHP package
=======================================

[](#yii2-wrapper-for-uploadcare-php-package)

> Uploadcare handles uploading, storing and processing files for you. All components of Uploadcare, from widget to CDN, work seamlessly together, require almost no configuration and allow maximum flexibility exactly when you need it.

[![Latest Stable Version](https://camo.githubusercontent.com/f9790c08062d68a2a45b744ca73bbbd4f2104be7c5ac23f82982af3ac4a75f10/68747470733a2f2f706f7365722e707567782e6f72672f736c617761702f796969322d75706c6f6164636172652f762f737461626c652e706e67)](https://packagist.org/packages/slawap/yii2-uploadcare)[![Total Downloads](https://camo.githubusercontent.com/b9802e6587bfc185f62782bb0b0dbac3d067d1dca2d29249c72d8a3bc3830512/68747470733a2f2f706f7365722e707567782e6f72672f736c617761702f796969322d75706c6f6164636172652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/slawap/yii2-uploadcare)[![Build Status](https://camo.githubusercontent.com/08a42fdf518dd72db4f6a7f8f121c2950778caf57a3e0a93698ea9c5775a3a6b/68747470733a2f2f7472617669732d63692e6f72672f736c617761702f796969322d75706c6f6164636172652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/slawap/yii2-uploadcarei)

[PHP Library](https://github.com/uploadcare/uploadcare-php)

[Uploadcare documentation](https://uploadcare.com/documentation/)

Configuration
=============

[](#configuration)

Api is a yii2 component, which is a facade to \\Uploadcare\\Api.

Example config:

```
'components' => [
    'uploadcare' => [
        'class' => 'uploadcare\yii2\Api',
        'publicKey' => 'your_public_key',
        'secretKey' => 'your_secret_key',
        'globalWidgetOptions' => [
            'UPLOADCARE_LOCALE' => 'ru',
        ]
    ]
]
```

globalWidgetOptions - allow you set global options for all call of widget. [supported options](https://uploadcare.com/documentation/widget/)

Widget
======

[](#widget)

Show file(s) input widget

Example call:

```
use uploadcare\yii2\UploadCare;

echo $form->field($model, 'logo')->widget(
    UploadCare::className(),
    [
        'options' => [
            'data' => [
                'multiple' => true
            ]
        ],
        'validators' => [
            new \yii\web\JsExpression('function (fileInfo) {
              console.log("test1");
            }'),
            new \yii\web\JsExpression('function (fileInfo) {
              console.log("test2");
            }')
        ]
    ]
);
```

Local widget settings you can set using html5 data attributes. [supported options](https://uploadcare.com/documentation/widget/)

[Validators allow restricting user choice to certain kind of files.](https://uploadcare.com/documentation/javascript_api/#validation)

Store file(s) permanently and set UUID to model attribute
=========================================================

[](#store-files-permanently-and-set-uuid-to-model-attribute)

Example config:

```
    public function behaviors()
    {
        return [
            'logo' => [
                'class' => FilesBehavior::class,
                'groupUUID' => false,
                'attributes' => ['logo']
            ]
        ];
    }
```

File(s)Behavior call api method for save file(s) permanently.

FilesBehavior - set UIID to model attribute

FilesBehavior - group UIID or files UIID array (depending on the groupUUID attribute) to model attribute.

Show images
===========

[](#show-images)

Image helper generates an image tag by UUID

Example:

```
echo Image::img($uuid, $options); //draw img tag
echo Image::img($image, ['width' => '100'])->resize(200)->crop(100,100); //resize and crop image, then render img tag
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~0 days

Total

10

Last Release

3239d ago

### Community

Maintainers

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

---

Top Contributors

[![sokrat](https://avatars.githubusercontent.com/u/427543?v=4)](https://github.com/sokrat "sokrat (12 commits)")[![slawap](https://avatars.githubusercontent.com/u/946466?v=4)](https://github.com/slawap "slawap (11 commits)")[![dimaninc](https://avatars.githubusercontent.com/u/4658059?v=4)](https://github.com/dimaninc "dimaninc (1 commits)")[![dmitry-mukhin](https://avatars.githubusercontent.com/u/925309?v=4)](https://github.com/dmitry-mukhin "dmitry-mukhin (1 commits)")

### Embed Badge

![Health badge](/badges/slawap-yii2-uploadcare/health.svg)

```
[![Health](https://phpackages.com/badges/slawap-yii2-uploadcare/health.svg)](https://phpackages.com/packages/slawap-yii2-uploadcare)
```

###  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)
