Need to maintiain session with requests from Flash movie

My application has a flash element in it which makes a couple of
different requests which need to maintain the session. Since flash
movies don’t seem to send the session cookie, I’ve had to pass in
Rails’ session_id and append that to the querystring of the URLs Flash
requests.

Problem is that works for the first type of request which is a GET.
With the POST request (which uploads a file) Rails ignores the
session_id I supply and I get a new session_id.

I don’t know if the session_id should be passed in as post data rather
than in the querystring for POST requests but due to a limitation in
how Flash does these uploads, the querystring is the only way I can do
it.

One solution would be to manually get Rails to use the right
session_id when it finds that parameter in the URL but I don’t know if
that’s possible.

Thanks

On 12 Mar 2007, at 12:54, David N. wrote:

I don’t know if the session_id should be passed in as post data rather
than in the querystring for POST requests but due to a limitation in
how Flash does these uploads, the querystring is the only way I can do
it.

One solution would be to manually get Rails to use the right
session_id when it finds that parameter in the URL but I don’t know if
that’s possible.

Use the hack described at:
http://blog.inquirylabs.com/2006/12/09/getting-the-_session_id-from-
swfupload/

Best regards

Peter De Berdt

Many thanks Peter, that was just what I was looking for.

David

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs