After clicking on this download svg button (simply downloads the generated QR code) it says Uncaught TypeError: Cannot read properties of null (reading 'src'). Facing this issue after upgrading to webpack.
Make sure to update both main functions, i.e. fileUpload and folderUpload
Code link:
$("#svg-download").on("click", function () {
// gets the base64 source of the qr code image
var qrCodeSrc = document.getElementById('qr-code-image').src;
var a = document.createElement("a");
// an invisible a tag is given that href.
a.href = qrCodeSrc;
// filename for the qrcode is set
a.download = "dscan_QR.png";
document.body.appendChild(a);
// the a tag is clicked, triggering the download
a.click();
document.body.removeChild(a);
});
For file structure and contributing guide, check the main README.md.
After clicking on this
download svg button
(simply downloads the generated QR code) it saysUncaught TypeError: Cannot read properties of null (reading 'src')
. Facing this issue after upgrading towebpack
.Make sure to update both main functions, i.e.
fileUpload
andfolderUpload
Code link:https://github.com/buidltools/dscan/blob/771cbb9c779b01fd0049926050be792b1a37e65f/src/js/qrcode.js#L42
https://github.com/buidltools/dscan/blob/771cbb9c779b01fd0049926050be792b1a37e65f/src/js/qrcode.js#L79
Download function:
For
file structure
andcontributing guide
, check the main README.md.