Revision #3 has been created by Maurizio Domba Cerin on Apr 18, 2011, 7:56:26 AM with the memo:
code formating
« previous (#2) next (#4) »
Changes
Title
unchanged
Uploading multiple images with CMultiFileUpload
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
CMultiFileUpload, File upload, image, saveAs
Content
changed
[...]
```php
// make the directory to store the pic:
if(!is_dir(Yii::getPathOfAlias('webroot').'/images/ADD YOUR PATH HERE!/'.$model->name)) {
mkdir(Yii::getPathOfAlias('webroot').'/images/ADD YOUR PATH HERE!/'.$model->name))
chmod(Yii::getPathOfAlias('webroot').'/images/ADD YOUR PATH HERE!/'.$model->name)), 0755);
// the default implementation makes it under 777 permission, which you could possibly change recursively before deployment, but here's less of a headache in case you don't
}
```
Now in your actionUpdate(), or actionCreate():[...]