Hi all,
i’m using Digitaralds Fancyupload to allow users, who are logged into the frontend (web context?), to upload pictures AJAX-style.
Since the call to the resource handling the upload is done via a flash movie, i’m having problems handling the verification of the user. I found out how the append the PHPSESSID value as a $_POST variable, but i don’t know what to do with it in the php script.
I’m currently checking authentication with this (and hope i’m handling this correctly):
/* from snippet: isLoggedIn - check user login */
$ctxs = !empty($ctxs) ? $ctxs : $modx->context->get('key');
if (!is_array($ctxs)) $ctxs = explode(',',$ctxs);
if (!$modx->user->hasSessionContext($ctxs)) {
sendError500andDie();
}