/// <summary>
        /// Get base directory for the specified campaign ID
        /// </summary>
        /// <param name="localization"></param>
        /// <param name="campaignId"></param>
        /// <returns></returns>
        protected string GetBaseDir(Localization localization, string campaignId)
        {
            var webAppBaseDir = HttpContext.Current.Server.MapPath("~/");
            var baseDir       = webAppBaseDir + SiteConfiguration.GetLocalStaticsFolder(localization.LocalizationId) + "/campaign-content/" + campaignId;

            return(baseDir);
        }
        private static string GetFilePathFromUrl(string urlPath, Localization loc)
        {
            // TODO: not nice to use HttpContext at this level
            HttpContext httpContext = HttpContext.Current;

            return((httpContext == null) ?
                   string.Format("{0}/{1}", SiteConfiguration.GetLocalStaticsFolder(loc.LocalizationId), Uri.UnescapeDataString(urlPath)) :
                   httpContext.Server.MapPath("~/" + SiteConfiguration.GetLocalStaticsFolder(loc.LocalizationId) + urlPath));
        }
 private static string GetFilePathFromUrl(string urlPath, Localization loc)
 {
     return(HttpContext.Current.Server.MapPath("~/" + SiteConfiguration.GetLocalStaticsFolder(loc.LocalizationId) + urlPath));
 }