544b4db19ee0f7f92c9d338d6900c34a53d9f032
chmalee
  Wed Jun 11 15:45:15 2025 -0700
Add back the good parts of b318572799b35, mostly have the pre-create hook set the upload path so we don't have to move files around in the pre-finish hook

diff --git src/hg/inc/userdata.h src/hg/inc/userdata.h
index f4d5b5d1e42..2c49013893f 100644
--- src/hg/inc/userdata.h
+++ src/hg/inc/userdata.h
@@ -30,30 +30,33 @@
 char *emailForUserName(char *userName);
 /* Fetch the email for this user from gbMembers hgcentral table */
 
 // the various quota helper variables:
 #define HUB_SPACE_DEFAULT_QUOTA_BYTES 10000000000
 #define HUB_SPACE_DEFAULT_QUOTA HUB_SPACE_DEFAULT_QUOTA_BYTES 
 // for defining the quota in hg.conf
 #define HUB_SPACE_CONF_QUOTA_VAR "hubspace.quota"
 
 char *webDataDir(char *userName);
 /* Return a web accesible path to the userDataDir, this is different from the full path tusd uses */
 
 char *urlForFile(char *userName, char *filePath);
 /* Return a web accessible URL to filePath */
 
+char *getEncodedUserNamePath(char *userName);
+/* Compute the path for just the userName part of the users upload */
+
 char *getDataDir(char *userName);
 /* Return the full path to the user specific data directory, can be configured via hg.conf
  * on hgwdev, this is /data/apache/userdata/userStore/hash/userName/
  * on the RR, this is /userdata/userStore/hash/userName/ */
 
 char *stripDataDir(char *fname, char *userName);
 /* Strips the getDataDir(userName) off of fname */
 
 char *prefixUserFile(char *userName, char *fname, char *parentDir);
 /* Allocate a new string that contains the full per-user path to fname. return NULL if
  * we cannot construct a full path because of a realpath(3) failure.
  * parentDir is optional and will go in between the per-user dir and the fname */
 
 char *hubNameFromPath(char *path);
 /* Return the last directory component of path. Assume that a '.' char in the last component