Hi,
I’m sorry that I keep posting the same issue. Everyday, I’m on step closer. Finally, I have found the exact problem and I hope someone can really help me.
Here’s the scenario:
I’m trying to go an AJAX call to a ProductController with actionUploaded()
I tried for two nights and cant seem to find an issue till today. The main problem is the Uploaded action got redirect to login page because the AJAX call is considered unauthenticated.
If I change the rule for action uploaded to "*", means anyone can access the action, it will work perfectly fine.
I did send PHPSESSID during the AJAX call and run this at the start of the actionUpload():
Yii::app()->session->sessionID = $_POST[‘PHPSESSID’];
Yii::app()->session->init();
It just didnt work and it redirect. to login page.
Is there any ways I can keep it logged in while doing an AJAX POST call?
Cheers,
Mickey