Multiple files upload with AJAX in Symfony 1.4
===

I have form which I use to creating an article. To the article I can assign images. I want to create an article and upload multiple images from the same page without page refreshing. I store images in directory name with Id of the article.
When I'm creating new article object I don't know to which directory save images (because article doesn't exist in database at that moment).
How can I solve this problem? Is in Symfony container for storing object for whole application (something like session for all users)? In this container I want to save first free article id to prevent situation when many users want to upload images.
Thanks
