コード例 #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);
        }
コード例 #2
0
ファイル: ThemeController.cs プロジェクト: frapid/frapid
        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);
        }