I am creating a pdf and saving it in node js backend. I want to send this PDF to react. Currently I am converting it to an array buffer and sending the buffer to react, how can I view that file in react?
data = fs.readFileSync(`./userCertificates/${username}.pdf`);
let setSendResponseData = new sendResponseData(data, 200, null);
let responseToSend = encryptionOfData(setSendResponseData.success()); //I am using encryption on both end
res.send(responseToSend);