Selecting upload folder function

Hi there. What I am trying to do in my project is have several possible folders on the server the user can upload a file or group of files to. I have tried using the FileTree component but it has limited functionality and the only event to capture is when a file is clicked. I want to capture the folder name and then that will be used in the file upload for the destination.
What is the best way to direct the file upload to a variable user selected folder?
Cheers.
What is the best way to direct the file upload to a variable user selected folder?
Cheers.