Difference between #6 and #7 of
Upload files in Yii2 with MongoDb and GridFs

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
[...]
6 0
6 followers
Viewed: 37 318 times
Version: 2.0
Category: How-tos
Written by: edoardo849
Last updated by: pceuropa
Created on: Feb 9, 2014
Last updated: 4 years ago
Update Article

Revisions

View all history