src/BloomExe/Extensions.cs
/// <summary>
/// Returns a localhost URL to a file
/// </summary>
/// <param name="fileName">The raw filename used by the operating system</param>
/// <returns>A well-formed, singly-encoded URL (special characters in the filename will be duly escaped, except for directory separators, which will be converted to '/' (if necessary))</returns>
Returns a localhost URL to a file
Returns a localhost URL to a file
public static string ToLocalhost(this string fileName)
		{
			if (fileName.StartsWith(BloomServer.ServerUrlWithBloomPrefixEndingInSlash)) return fileName;
			return BloomServer.ServerUrlWithBloomPrefixEndingInSlash + fileName.EscapeFileNameForHttp();
		}
public static string ToLocalhost ( this string fileName ) { if ( fileName . StartsWith ( BloomServer . ServerUrlWithBloomPrefixEndingInSlash ) ) return fileName ; return BloomServer . ServerUrlWithBloomPrefixEndingInSlash + fileName . EscapeFileNameForHttp ( ) ; }
Returns a localhost URL to a file
Returns a localhost URL to a file
// don't do this if it is done already
A well-formed, singly-encoded URL (special characters in the filename will be duly escaped, except for directory separators, which will be converted to '/' (if necessary))
A well - formed singly - encoded URL ( special characters in the filename will be duly escaped except for directory separators which will be converted to ' / ' ( if necessary ))
string
this
fileName
The raw filename used by the operating system
The raw filename used by the operating system