Revision #7 has been created by edoardo849 on Mar 2, 2014, 12:19:47 AM with the memo:
updated model comments
« previous (#6) next (#8) »
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
[...]
* @property string $length
* @property string $chunkSize
* @property string $md5
* @property array $file
* @property string $newFileContent
* Must be application/pdf, image/png, image/gif etc...
* @property string $contentType
* @property string $description
*/[...]
{
$model=$this->findModel($id);
header('Content-type: application/'.$model->contentType);
echo $model->file->getBytes();
}
```
Rendering the file[...]