public static string GetPrivateRootUserUploadDirectory(
            this IWebHostEnvironment hostingEnvironment,
            Guid?userId = null)
        {
            string userFolder = CryptoFunctions.MD5Hash(userId.ToString()).ToLower();

            return(Path.Combine(hostingEnvironment.GetPrivateRoot(), Constants.UploadFolderName, Constants.UsersFolderName, userFolder));
        }
 public static string GetPrivateRootTempUploadDirectory(this IWebHostEnvironment hostingEnvironment)
 {
     return(Path.Combine(hostingEnvironment.GetPrivateRoot(), Constants.UploadFolderName, Constants.TempFolderName));
 }