If you do not have too many folders then I suggest you use if statements to choose an upload folder depending on the user input details. E.g.
String user= request.getParameter("username");
if (user=="Alfred"){
//Path A;
}
if (user=="other"){
//Path B;
}