Upload files in Yii2 with MongoDb and GridFs

Comparing #6 with #7

Revision #7 was created by edoardo849 edoardo849 on Mar 2, 2014, 12:19:47 AM.

updated model comments

Content

[...]
* @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
[...]