I am having trouble whit this simple piece of code:
fs.readFile('public/PDF/Booklet_nl.pdf', (err,data)=>{
if(err){
throw err
}
res.send(data);
});
The file can be downloaded but I am not able to visualize the PDF in the browser.
I am having trouble whit this simple piece of code:
fs.readFile('public/PDF/Booklet_nl.pdf', (err,data)=>{
if(err){
throw err
}
res.send(data);
});
The file can be downloaded but I am not able to visualize the PDF in the browser.
Copyright © 2021 Jogjafile Inc.
For that, You should set headers as following: