Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

198
Views
How do I put a qr code inside a webpage, html, in an Azure Function?

I need to do the following: Create an azure Function that generates a qr code, and show it on the site (with the string you receive)


const QRCode = require('qrcode');


module.exports = async function (context, req) {
    context.log('JavaScript HTTP trigger function processed a request.');
    

    if(req.query.text) { 
        let code;
        try {
            code = await QRCode.toDataURL(req.query.text);
        } catch (err) {
            context.log.error('ERROR', err);
            throw err;
        }
        if (code) {
            context.res = {
                body: code
                
            }
            
        } else {
            context.res = {
                body: "Error: QR Code rendering error",
                status: 400
            }
        }
    } else {
        context.res = {
            body: "Error: Missing query string text",
            status: 400
        }
    }
}

I'm using node, with the node -qr code library. It's generating the right qr,i'm testing with query, but it's coming like this:

URI is a base64 encoded string that represents a file 1

I want to include the image directly from the qr, in a custom webpage

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!