Skip to content
jalpertti edited this page Nov 27, 2014 · 1 revision

Sorry to bother you with my question, but this is bugging my mind…

Is there any way to use your thumbnail component from other mode than the calling model? For example in the example application PET –model is using the component and the data is saved to that model.

I have a situation, where my model that uses component is called IMAGE and I would like to save images from COLLABORATION –model. This is because when I save collaboration messages, I would like to save image (and it’s different versions) as well in the same controller. I seem not to find the right format of the code to save data, Cake always says “Undefined index: collaboration” when I call it this way:

$this->Attachment->upload($this->request->data['Collaboration']);

Also calling this way won’t work (naturally):

$this->Attachment->upload($this->request->data['Image']);

Is there any discussions around this or blog that I could ask these questions from community?

Thanks,

Clone this wiki locally