public string GetUriPath(string filename) { if (string.IsNullOrEmpty(Host)) { return(string.Empty); } if (HttpHomePathNoExtension) { filename = Path.GetFileNameWithoutExtension(filename); } string path; HttpHomePath = FTPHelpers.RemovePrefixes(HttpHomePath); NameParser nameParser = new NameParser(NameParserType.URL); string httpHomePath = nameParser.Parse(HttpHomePath.Replace("%host", Host)); string subFolderPath = GetSubFolderPath(); string browserProtocol = BrowserProtocol.GetDescription(); if (string.IsNullOrEmpty(httpHomePath)) { string host = Host; if (host.StartsWith("ftp.")) { host = host.Substring(4); } path = Helpers.CombineURL(host, subFolderPath, filename); } else { if (!httpHomePath.StartsWith("@")) { path = Helpers.CombineURL(httpHomePath, subFolderPath); } else { path = httpHomePath.Substring(1); } if (path.EndsWith("=")) { path += filename; } else { path = Helpers.CombineURL(path, filename); } } if (!path.StartsWith(browserProtocol)) { path = browserProtocol + path; } return(path); }
public string GetHttpHomePath() { NameParser parser = new NameParser(NameParserType.URL); HttpHomePath = FTPHelpers.RemovePrefixes(HttpHomePath.Replace("%host", LocalhostRoot)); return(parser.Parse(HttpHomePath)); }
public string GetHttpHomePath() { HttpHomePath = FTPHelpers.RemovePrefixes(HttpHomePath); NameParser nameParser = new NameParser(NameParserType.URL); return(nameParser.Parse(HttpHomePath.Replace("%host", Host))); }
public string GetHttpHomePath() { string homePath = HttpHomePath.Replace("%host", Host); CustomUploaderParser parser = new CustomUploaderParser(); parser.UseNameParser = true; parser.NameParserType = NameParserType.URL; return(parser.Parse(homePath)); }
public string GetHttpHomePath() { // @ deprecated if (HttpHomePath.StartsWith("@")) { HttpHomePath = HttpHomePath.Substring(1); HttpHomePathAutoAddSubFolderPath = false; } return(NameParser.Parse(NameParserType.URL, HttpHomePath.Replace("%host", Host))); }
public string GetHttpHomePath() { // @ deprecated if (HttpHomePath.StartsWith("@")) { HttpHomePath = HttpHomePath.Substring(1); HttpHomePathAutoAddSubFolderPath = false; } HttpHomePath = URLHelpers.RemovePrefixes(HttpHomePath); return(NameParser.Parse(NameParserType.URL, HttpHomePath.Replace("%host", FileHelpers.ExpandFolderVariables(LocalhostRoot)))); }
public string GetHttpHomePath() { // @ deprecated if (HttpHomePath.StartsWith("@")) { HttpHomePath = HttpHomePath.Substring(1); HttpHomePathAutoAddSubFolderPath = false; } HttpHomePath = URLHelpers.RemovePrefixes(HttpHomePath); NameParser nameParser = new NameParser(NameParserType.URL); return(nameParser.Parse(HttpHomePath.Replace("%host", Host))); }
public string GetHttpHomePath() { return(NameParser.Parse(NameParserType.URL, HttpHomePath.Replace("%host", Host))); }