SECURITY: file sharing folder structure and hash ids
===

From experience, what's the most secure method / directory structure to store files. I want to start a file sharing service. I'd also like to protect my links / generated hashes (I do short urls) from spamming. Any ideas at all will be appreciated. I do php and jquery.