Yii Framework Forum: fileimagearbehavior - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

fileimagearbehavior Discussion about the fileimagearbehavior extensio Rate Topic: -----

#21 User is offline   florin p 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 36
  • Joined: 25-September 11

Posted 04 June 2012 - 12:00 PM

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.
1

#22 User is offline   florin p 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 36
  • Joined: 25-September 11

Posted 06 June 2012 - 09:38 AM

View Postflorin p, on 04 June 2012 - 12:00 PM, said:

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
0

#23 User is offline   leocharrua 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 12-October 11

Posted 17 October 2012 - 08:53 AM

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
0

#24 User is offline   two_pizza 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 09-May 14

Posted 18 May 2014 - 01:11 PM

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

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users