Пример #1
0
 // /open/Qr?content=baidu.com
 public IActionResult Qr(string content)
 {
     if (!content.HasValue())
     {
         content = "baidu.com";
     }
     return(File(QRCoderUtility.CreateQrCode(content).BitmapToBytes(), "image/jpeg"));
 }
Пример #2
0
        // /Demo/TestQR?content=baidu.com
        public ActionResult TestQR(string content)
        {
            if (!content.HasValue())
            {
                content = "baidu.com";
            }

            var path = "/UserFiles/QrCode.jpg";

            QRCoderUtility.CreateQrCode(content, PathUtility.ToPhysicalPath(path));
            return(File(path, "image/jpeg"));
        }