PHPackages                             2amigos/yii2-file-input-widget - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. 2amigos/yii2-file-input-widget

AbandonedArchivedYii2-extension[Utility &amp; Helpers](/categories/utility)

2amigos/yii2-file-input-widget
==============================

Jasny file input widget for the Yii framework

1.0.2(10y ago)2341.1k↓42.1%20[6 issues](https://github.com/2amigos/yii2-file-input-widget/issues)2BSD-3-ClausePHP

Since Apr 9Pushed 5y ago18 watchersCompare

[ Source](https://github.com/2amigos/yii2-file-input-widget)[ Packagist](https://packagist.org/packages/2amigos/yii2-file-input-widget)[ Docs](https://github.com/2amigos//yii2-file-input-widget)[ RSS](/packages/2amigos-yii2-file-input-widget/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (10)Used By (2)

FileInput Widget for Yii2
=========================

[](#fileinput-widget-for-yii2)

[![Latest Version](https://camo.githubusercontent.com/a3a67b20466cb64bd27d0ad37f0e619338f1b72344e01672a98986a4cb49be12/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f32616d69676f732f796969322d66696c652d696e7075742d7769646765742e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://github.com/2amigos/yii2-file-input-widget/tags)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/c98edd1281d852b391f54369671f543cf214ddc221a3eef78c475b8871e4d2d1/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f32616d69676f732f796969322d66696c652d696e7075742d7769646765742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/2amigos/yii2-file-input-widget)[![Coverage Status](https://camo.githubusercontent.com/2284a9f9f6a55ee69c480ea35c406c7cdafee08f597a69482564f28c8ed3cfe8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f32616d69676f732f796969322d66696c652d696e7075742d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/2amigos/yii2-file-input-widget/code-structure)[![Quality Score](https://camo.githubusercontent.com/a00233fed7a669098d8d5c3f62d587758d79a0d614727534417140eae36da492/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f32616d69676f732f796969322d66696c652d696e7075742d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/2amigos/yii2-file-input-widget)[![Total Downloads](https://camo.githubusercontent.com/cbbb7c336d5093dac42f42bfdf3f9985839ebbdf0a52ecf14db866bb63fbeb16/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f32616d69676f732f796969322d66696c652d696e7075742d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/2amigos/yii2-file-input-widget)

This widget allows to make use of the great [File Input Plugin](http://jasny.github.io/bootstrap/javascript/#fileinput) that [Arnold Daniels](https://twitter.com/ArnoldDaniels) developed to enhance our Bootstrap experience.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ composer require 2amigos/yii2-file-input-widget:~1.0
```

or add

```
"2amigos/yii2-file-input-widget": "~1.0"

```

to the `require` section of your `composer.json` file.

Then, Add to your configuration file, the following to your `components` section:

```
'i18n' => [
      'translations' => [
          'file-input*' => [
              'class' => 'yii\i18n\PhpMessageSource',
              'basePath' => dirname(__FILE__).'/../vendor/2amigos/yii2-file-input-widget/src/messages/',
          ],
      ],
  ],
```

If a translation is missing, feel free to make a PR and I will merge it.

Usage
-----

[](#usage)

Using a model:

```
use dosamigos\fileinput\FileInput;

```

### Update

[](#update)

We have included the [improved and multiple file upload version from Krajee](http://plugins.krajee.com/file-input).

```
