PHPackages                             kasoft/yii2-fileupload - 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. kasoft/yii2-fileupload

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

kasoft/yii2-fileupload
======================

FileUpload is plugin for uploading and handling Files in Yii2

v1.1.4(2mo ago)019↓50%MITPHPPHP &gt;=8.1

Since Sep 5Pushed 2mo agoCompare

[ Source](https://github.com/kasoft/yii2-fileupload)[ Packagist](https://packagist.org/packages/kasoft/yii2-fileupload)[ RSS](/packages/kasoft-yii2-fileupload/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (0)

Yii2 File Upload with FilePond Integration
==========================================

[](#yii2-file-upload-with-filepond-integration)

This extension provides a compact upload widget for Yii2 based on FilePond and a matching server-side upload handler. It lets you upload single or multiple files from views and store them on the server — optionally with ActiveRecord binding and image variants.

Features
--------

[](#features)

- FilePond as a Yii2 widget (including auto-initialization for plain `` fields)
- Multiple uploads and acceptance filters (MIME types/extensions)
- Chunked uploads (enabled by default) to bypass PHP post\_max\_size limits
- Server-side UploadHandler with:
    - configurable target path (@webroot/uploads by default)
    - optional subfolder by model\_id
    - optional cleaning of the target folder on reassignment
    - automatic model binding (ActiveRecord) and attribute assignment
    - optional creation of image variants (a\_ and w\_)
- CSRF support via X-CSRF-Token header

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Yii2 ~ 2.0.43
- npm-asset/filepond ^4 (installed via Composer dependency)

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

[](#installation)

Install via Composer:

```
composer require kasoft/yii2-fileupload
```

PSR-4 autoload configuration is included in the package.

Quick Start: Use the widget in a view
-------------------------------------

[](#quick-start-use-the-widget-in-a-view)

In a view (e.g., views/site/index.php):

```
