If you use one method to always return the different paths on all parts of the upload process you will also find it a lot easier if you do want to break things down further at a later point. Better to use a class instead of functions.
eg.
GetUserUploadBaseDir( $user_id ) // can change from /monkey/ to /m/monkey/ or /mo/monkey/ as things grow
GenerateUserUploadBaseDir( $ user_id )
(
calls GetUserUploadBaseDir( $user_id ) and creates if necessary
)
GetUserFileUploadDir( $user_id , $upload_id )
(
calls GetUserUploadBaseDir( $user_id ) and appends the extra specifics, if gets really big then you can switch it to server farms etc.
)
GenerateUserFileUploadDir( $user_id , $upload_id )
( calls GetUserFileUploadDir( $user_id , $upload_id ) and creates the directories from the user folder level down if necessary. )
GetUploadFileLocation( $user_id , $upload_id )
(
calls GetUserUploadFolderLocation( $user_id , $upload_id ) and appends filename
)
passing ( $user_id , $upload_id ) intead of just $upload_id in some things is just a matter of taste as a lookup can always be down on the user_id from the upload_id.
All generic viewing across the site will just call GetUploadFileLocation all the time. That's the basic premise.
Exact implementation is dependant on the situation.
When the time comes to change you can use the old version of the class to give you the original location and then the new one to generate the new structure and then copy/move the old GetUploadFileLocation to the new GetUploadFileLocation in a script. This is why classes really help with this as 1 classname change is easier to contend with then multiple function name changes. Then upload the new class when renamed to the old one and everything should be fine and easy. Like a ninja.
I am a bit tired/blind/really trippy at the moment so am hoping I have been consistent/ made sense.