コード例 #1
0
        public FileResult Get([FromRoute] string value)
        {
            var info = TranslateUtils.JsonDeserialize <CaptchaUtils.Captcha>(_settingsManager.Decrypt(value));

            var bytes = CaptchaUtils.GetCaptcha(info.Value);

            return(File(bytes, "image/png"));
        }
コード例 #2
0
        public FileResult CaptchaGet([FromQuery] string token)
        {
            var captcha = TranslateUtils.JsonDeserialize <CaptchaUtils.Captcha>(_settingsManager.Decrypt(token));

            var bytes = CaptchaUtils.GetCaptcha(captcha.Value);

            return(File(bytes, "image/png"));
        }