2 forms + one to one relationship

Hi,

I have 2 controllers (posts and images) and one to one relationship. In
my post/new.rhmtl I have two forms.

One is for uploading image, the image form submit button initialize
lightbox to crop the image.
The second form is for post. How can I assign image I have uploaded to
the article I am just writting.

Thank you very much for your ideas.
P.