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));
        }
Exemple #2
0
        public static string GetPublicRootUserContentDirectory(this IHostingEnvironment hostingEnvironment, Guid userId)
        {
            string userFolder = CryptoFunctions.MD5Hash(userId.ToString()).ToLower();

            return(Path.Combine(hostingEnvironment.WebRootPath, Constants.ContentFolderName, Constants.UsersFolderName, userFolder));
        }