fileimagearbehavior

Hi,

I’m also trying to integrate ImageARBehavior with xupload, but if I edit Edit FileARBehavior.php as freedom55 suggested:


public function afterSave($evt) {

                //$file = CUploadedFile::getInstance($this->owner, $this->attribute);

                //change to 

                $file = $this->owner->{$this->attribute};

...

I got “Error CException” :mellow::( If anyone know how to fix this please reply. Any help will be much appreciated.

Solved, it is possible to have dynamic path? for example:

‘relativeWebRootFolder’ => ‘upload/’.$this->movie_id, // this folder must exist

When you create the model has no id, then the name of the generated file is incomplete (only the suffix), how do I fix this? thanks

Cool extension. I using second example. How I can upload more than one image?