Thank you

Media plugin some how bind to the save function.
So How do I tell the media plugin not to run after save and run only when I
have the post_id?

On Wed, Sep 14, 2011 at 11:47 AM, BenJsno <[email protected]> wrote:

> You have to save your post before upload the file.
> in your Post_controller :
>
>        function add() {
>                [...]
>                if (!empty($this->data)) {
>
>                        $this->Post->create();
>                        if ($this->Post->save($this->data)) {
>                                [...]
>                                $new_id = $this->Post->id
>                                // you can maybe put this data temporarily
> in the session
>                                $this->Session->write('Post.last_id',
> $this->Post->id);
>                        } else {
>                                [...]
>                        }
>                }
>
>                [...]
>        }
>
> Hope this helps you
>
>
> On 13 sep, 13:24, ZAky <[email protected]> wrote:
> > I save my posts files under /files/[user_id]/[post_id]/[image].
> > This mean I need to know the just seved post id in Post->transfer_to.
> > How do I achieve that?
> >
> > Thank you
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
Regards,
Zaky Katalan-Ezra
QA Administrator
www.IGeneriX.com
Sites.IGeneriX.com
054-7762312

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to