Oni's method might be simpler. In /upload/files/ (or secret, or whatever you want to call the second directory), have something like this in a .htaccess file:
Order allow,deny
Deny from all
Then, use a PHP script to handle authentication. If they're authenticated, send them the file they requested using a script such as Oni's. Using a function like [man]glob/man or [man]readdir/man, you can easily list all files in the secret directory in your PHP script.