<commit_before>File Uploader
=============
> Not ready for production yet.

File uploader. Yii2 extension based on [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload).

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

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

Either run

```
php composer.phar require --prefer-dist joni-jones/yii2-fuploader "*"
```

or add

```
"joni-jones/yii2-fuploader": "*"
```

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


Usage
-----

Once the extension is installed, simply use it in your code by  :

```php
<?= \jones\fuploader\FileUpload::widget();?>
```

1. Specify `action` property for uploading url:

    ```php
    FileUpload::widget([
        'action' => Url::to(['some_action'])
    ]);
    ```
    
2. Specify any jquery file upload options:

    ```php
    FileUpload::widget([
        'plugin' => [
            'formData' => 'some data',
        ]
    ]);
    ```
	
3. To setup plugin events or callbacks - use `clientEvents` option for widget:

	```php
	FileUpload::widget([
		'clientEvents' => [
			'done' => 'function(e, data){console.log(data);}',
			'fail' => 'function(e, data){console.log(data);}'
		]
	]);
	```<commit_msg>Added license<commit_after>File Uploader
=============
> Not ready for production yet.

File uploader. Yii2 extension based on [jQuery File Upload Plugin](https://github.com/blueimp/jQuery-File-Upload).

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

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

Either run

```
php composer.phar require --prefer-dist joni-jones/yii2-fuploader "*"
```

or add

```
"joni-jones/yii2-fuploader": "*"
```

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


Usage
-----

Once the extension is installed, simply use it in your code by  :

```php
<?= \jones\fuploader\FileUpload::widget();?>
```

1. Specify `action` property for uploading url:

    ```php
    FileUpload::widget([
        'action' => Url::to(['some_action'])
    ]);
    ```
    
2. Specify any jquery file upload options:

    ```php
    FileUpload::widget([
        'plugin' => [
            'formData' => 'some data',
        ]
    ]);
    ```
	
3. To setup plugin events or callbacks - use `clientEvents` option for widget:

	```php
	FileUpload::widget([
		'clientEvents' => [
			'done' => 'function(e, data){console.log(data);}',
			'fail' => 'function(e, data){console.log(data);}'
		]
	]);
	```

License
----

MIT
{'fraction_non_alphanumeric': 0.1843687374749499, 'fraction_numerical': 0.004809619238476954, 'mean_word_length': 3.153078202995008, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3536261', 'n_tokens_mistral': 854, 'n_tokens_neox': 807, 'n_words': 215}