Changes
Title
unchanged
Saving files to a blob field in the database
Category
unchanged
Tips
Yii version
unchanged
Tags
unchanged
File upload
Content
changed
[...]
In the view we put the code:
```php
'value'=><? echo CHtml::link(my_link_name,array('displaySavedImage','id'=>$model->primaryKey))
,; ?>
```[...]
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Transfer-Encoding: binary');
header('Content-length: '.$model->cv_file_size);
header('Content-Type: '.$model->
cv_file_type);
header('Content-Disposition: attachment; filename='.$model->
cvfile_name);
echo $model->
cv_file_content;
}
```
Note *$_GET\['id'\]* as passed argument of loadModel function.