hello,

yes i already thought about using Session::State::URI  for this problem.
but i don't want to enable State::URI for the rest of the app.
it is just this one action that needs to restore the session from the parameter.

so, maybe doing a manual call like:
        $c->_load_session($c->req->param('session_id');
would be better for my concers.

i tried also tried $c->_load_sessionid...
but calling on of these functions did not work out.

i'd like fake a session restore, like State::URI does from the param, or State::Cookie from the cookie value..

thanks,
bye, bernhard


On 03.07.2010, at 02:30, Charlie Garrison wrote:

Good morning,

On 2/07/10 at 10:30 AM +0200, Bernhard Bauch <[email protected]> wrote:

i'm trying to use this super nice jquery file uploader with progress bar (http://www.uploadify.com/).

[...]

the problem is i did not manage to restore the session from the session-id manually. i did try to call some of the functions of Plugin::Session manually, but it did not work out.

Use Session::State::URI, eg.

  use Catalyst qw/ ....
    Session
    Session::Store::FastMmap
    Session::State::Cookie
    Session::State::URI


And in your javascript, tell uploadify which session_id to use:

    $('#uploadify').uploadify({
        ....
        'scriptData'  : {'session.id': '[% c.sessionid %]' },
        ...

Note, I generate the javascript in my template file, so the session_id becomes hard-coded in each page. You could also read the current cookie session and pass that in instead.

Also, I did that code ages ago, there could be some other config data elsewhere that I'm not remembering. Eg. I'm not sure why the scriptData is using session.id rather than session_id.

I also seem to recall having to put in an exception somewhere for my upload action, again don't recall what that way. If you get stuck let me know and I'll dig through my code some more.

Charlie

--
   Ꮚ Charlie Garrison ♊ <[email protected]>

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/ [email protected]/
Dev site: http://dev.catalyst.perl.org/

Bernhard Bauch, Webdevelopment
ZSI - Zentrum für soziale Innovation
[email protected]


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to