Found the solution!
Basically, I am assigning the values I want as JS variables in the footer. I, then, use the variables that have the data I need on main.js like this:
$('#fileupload').fileupload({
url: '.../uploads/index.php?page_type=' + THE_VARIABLE
});
Now, the data is passed to the index.php file under my uploads directory. So, I get the query string and send it to the UploadHandler.php:
parse_str($_SERVER['QUERY_STRING'], $query_string);
$options('upload_dir'=>$query_string['page_type'], 'upload_url'=>'../uploads/'.$query_string['page_type']);
...
$upload_handler = new UploadHandler($potions);
Boom! Works like a charm!