Example #1
0
        public ActionResult GetBinary(string themeName, string file)
        {
            if (string.IsNullOrWhiteSpace(themeName) || string.IsNullOrWhiteSpace(file))
            {
                return this.AjaxFail("Access is denied", HttpStatusCode.BadRequest);
            }

            string path = new ThemeFileLocator(themeName, file).Locate();
            string mimeType = GetMimeType(path);
            return File(path, mimeType);
        }
Example #2
0
        public ActionResult GetBinary(string themeName, string file)
        {
            if(string.IsNullOrWhiteSpace(themeName) ||
               string.IsNullOrWhiteSpace(file))
            {
                return this.AccessDenied();
            }

            string path = new ThemeFileLocator(themeName, file).Locate(this.Tenant);

            string mimeType = this.GetMimeType(path);
            return this.File(path, mimeType);
        }