Let me clarify:
Say the file is "www/docs/file.pdf"
Couldn't I write a cgi that would recieve as a paramenter the file "id", obtain the filename from a db with the given id, then open a filehandle for that file, read its contents into a buffer, and print the buffer contents to the response?
The user would only see "cgi-bin/get_file.cgi?id=xxx" in the url.