On 2 Lip, 21:25, Miles J <mileswjohn...@gmail.com> wrote:
> Thanks, I will patch this :]
>
> On Jul 2, 7:09 am, red <mbu...@gmail.com> wrote:
>
>
>
> > Ok, I've figured it out - Uploader won't work if there is multiple
> > models in form (SecurityComponent adds hidden fields with _Token key,
> > so it's treated as another model in data table).
>
> > Quick fix in attachment.php file (from line 150):
>
> > if (count($Model->data) == 1) {
> > $fileToUpload = $file;} else {
>
> > $fileToUpload = $Model->alias.'.'.$file;
>
> > }
>
> > // Upload file and attache to model data
> > if ($data = $this->Uploader->upload($fileToUpload, $options)) {
>
> > [...]
>
> > On 2 Lip, 14:53, red <mbu...@gmail.com> wrote:
>
> > > Hi,
> > > I'm using MilesJ's Uploader plugin [1][2] and it works very well. I'm
> > > using it as the behavior for model. Now I need to enable
> > > SecurityComponent, but uploading doesn't work any more. I'm getting
> > > error from Upload Behavior: "There was an error attaching this file!".
>
> > > I've also set Security->validatePost to false, but nothing changed.
> > > When component is off uploading works perfect. Has anyone similar
> > > problem?
>
> > > Regards
> > > Marcin
>
> > > [1]http://github.com/milesj/cake-uploader
> > > [2]http://www.milesj.me/resources/script/uploader-plugin
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment