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")); }
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")); }