I'm trying to get a session variable value set in JS with PHP in back-end (I'm using Symfony).
I set my variable like so:
sessionStorage.setItem('test-name', file);
This works well because I can see in the browser console my session variable and its value. However, on the back-end, I'm unable to get it. I tried the following:
$this->get('session')->get('test-name');
But it doesn't work. What am I doing wrong?