Here's the solution I finally ended up with.
First, I added URL parameters to the data-url in the input tag that the file uploader is attached to (it should be pointing to the jquery file upload server/php/ subfolder, which contains an index.php file):
<input type="file" name="files[]" data-url="/jquery-file-upload/server/php/?type=a">
I then used a SWITCH statement in the index.php file that the data-url points to:
switch ($_GET["type"]) {
case "a":
$upload_dir = '/custom/folder/here/';
$upload_url = '/custom/folder/here';
$allowed_exts = '/\.(jpg|jpeg|gif|png)$/i';
break;
case "b":
// you get the idea
break;
default:
$upload_dir = dirname($_SERVER['SCRIPT_FILENAME']).'/files/';
$allowed_exts = '/.+$/i';
break;
}
Finally, in the upload.class.php file I modified the appropriate lines depending on which values I wanted to customize using the SWITCH:
function __construct($options = null, $initialize = true) {
$this->options = array(
'script_url' => $this->get_full_url().'/',
'upload_dir' => $GLOBALS["upload_dir"],
'upload_url' => $GLOBALS["upload_url"],
'user_dirs' => false,
'mkdir_mode' => 0755,
'param_name' => 'files',
'delete_type' => 'DELETE',
'access_control_allow_origin' => '*',
'download_via_php' => false,
'inline_file_types' => '/\.(gif|jpe?g|png)$/i',
'accept_file_types' => $GLOBALS["allowed_exts"],
...etc
The variables that I defined in the SWITCH are used here as `$GLOBALS["varname"] so that they can be used from within the class.
I hope this is able to help someone. Each person's case is going to be different so I don't recommend copying and pasting this code exactly. I was just trying to illustrate the basic idea.
NOTE: "upload_dir" is the ROOT path and "upload_url" is the public path.
Also note: As you can see in my example I also used this method to determine which filetypes to allow depending on the conditions.
There is probably a built-in way to do this through the file uploader API/Options, but the documentation is very vague about what you can actually do.