Example #1
0
        public string MakeHttpUrl(string localFilePath)
        {
            string normalizedPath = diskProvider.NormalizePath(localFilePath);

            if (!Path.IsPathRooted(normalizedPath))
            {
                return(diskProvider.Combine(WebRootHttpPath, normalizedPath));
            }

            string relativePath = diskProvider.MakePathRelative(WebRootDirectory, normalizedPath);

            return(diskProvider.Combine(WebRootHttpPath, relativePath));
        }