Anyone can help me? David?

Thanks.

On Jul 22, 12:06 pm, mbavio <[email protected]> wrote:
> Hey, I´m, trying to incorporate the plugin in my app, since it seems
> amazing!
>
> But I´m having some problems trying to implement it. Here they are:
>
> I have Listing hasMany Attachment relationship
>
> Then my data array is filled like this:
>
> Array
> (
>     [Listing] => Array
>         (
>             [id] => 150
>             [name] => JD1711
>         )
>
>     [Attachment] => Array
>         (
>             [0] => Array
>                 (
>                     [file] => Array
>                         (
>                             [name] => biglogo.png
>                             [type] => image/png
>                             [tmp_name] => C:\xampp\tmp\phpAC.tmp
>                             [error] => 0
>                             [size] => 5541
>                         )
>
>                 )
>
>             [1] => Array
>                 (
>                     [file] => Array
>                         (
>                             [name] => corporate.JPG
>                             [type] => image/jpeg
>                             [tmp_name] => C:\xampp\tmp\phpAD.tmp
>                             [error] => 0
>                             [size] => 102052
>                         )
>
>                 )
>
>         )
>
> )
>
> Now, I´m doing $this->Listing->Attachment->saveAll($this->data); in
> the Listings Controller (I know I could do just $this->Listing-
>
> >saveAll too, but it´s the same).
>
> The problem is in the prepare method of the Transfer behavior, line
> 193:
>
> if (isset($Model->data[$Model->alias]['file'])) {
>
> As you can see in my array, I have two files and this code seems
> prepared to save just one file (since it looks for the 'file' field
> directly, not having numeric indexes in mind.
>
> Now, I know I can save files one by one, but seems like overkill, so I
> just wanted to know what to do here, since the code seems not ready to
> handle multiple file savings.
>
> Any hint?
>
> Thank you very much!
>
> Martin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to