Revision #11 has been created by skworden on Oct 30, 2014, 11:18:20 PM with the memo:
updated namespace
« previous (#10) next (#12) »
Changes
Title
unchanged
Upload files in Yii2 with MongoDb and GridFs
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
yii2, mongodb, gridfs, File upload
Content
changed
[...]
In _form.php (format as you like, in this case there's no html because I put this form in a modal with custom html and tags that can be confusing for the sake of the tutorial)
```php
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
$form = ActiveForm::begin([
'options'=>['enctype'=>'multipart/form-data']]);?>
<?= $form->field($model, 'description')->textInput(['class'=>'form-control inline-input', 'placeholder'=>Yii::t('app', 'Description')])->label('')?>
<?= $form->field($model, 'file')->fileInput()->label('')?>[...]