I'm using a flash component in my symfony2 application which uploads multiple images, and when they reach the server I want to re-open the session so that I can store the image in a location relative to the logged in user. I am sending the PHP session ID with each file upload...

In vanilla PHP I can achieve this along the lines of...

session_id($originalSessionId); session_start();

but is there a symfony2 way of doing this using the security context?

EDIT: This is a similar question, although I want to maybe create some kind of token based login by passing a token and securing the upload URL with a separate firewall.