File upload and file access
If you want to prevent users from downloading the file directly by URL, you should not use the public download method. You should use the private method and use the functions in file.inc to access the files with PHP.