Example #1
0
        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));
        }
Example #3
0
        public string GetHttpHomePath()
        {
            HttpHomePath = FTPHelpers.RemovePrefixes(HttpHomePath);
            NameParser nameParser = new NameParser(NameParserType.URL);

            return(nameParser.Parse(HttpHomePath.Replace("%host", Host)));
        }
Example #4
0
        public string GetHttpHomePath()
        {
            string homePath = HttpHomePath.Replace("%host", Host);

            CustomUploaderParser parser = new CustomUploaderParser();

            parser.UseNameParser  = true;
            parser.NameParserType = NameParserType.URL;
            return(parser.Parse(homePath));
        }
Example #5
0
        public string GetHttpHomePath()
        {
            // @ deprecated
            if (HttpHomePath.StartsWith("@"))
            {
                HttpHomePath = HttpHomePath.Substring(1);
                HttpHomePathAutoAddSubFolderPath = false;
            }

            return(NameParser.Parse(NameParserType.URL, HttpHomePath.Replace("%host", Host)));
        }
Example #6
0
        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))));
        }
Example #7
0
        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)));
        }
Example #8
0
 public string GetHttpHomePath()
 {
     return(NameParser.Parse(NameParserType.URL, HttpHomePath.Replace("%host", Host)));
 }