I have a URL for an API request that automatically downloads and saves a QR code image from the browser.
The Content-Type of the URL is application/jpeg, and its format looks like this:
application(websiteURL)/egs?cmd=gen_qrcode&customer_id=123&name=abc
Before the slash is the URL of my app, followed by key-value pairs of the request.
When I paste this URL in the browser, it downloads a QR code jpg automatically. However, I want to get the image in jpg (or another image type) to display on my web application without saving it.
When I use Postman and save the file, it provides me with the header information:
Content-Disposition: attachment; filename="filename.jpg";
Content-Type: application/jpeg;
I am using JavaScript and Vue, and I am wondering if there is a way to prevent the automatic saving of the image and directly display it on the web application.