Ejemplo n.º 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"));
        }
Ejemplo n.º 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"));
        }