How to send pdf file path. I have to send below pdf path to open in a new window
res.send(__dirname + '/../assets/public/abc.pdf)Added code snippet
How to send pdf file path. I have to send below pdf path to open in a new window
res.send(__dirname + '/../assets/public/abc.pdf)Added code snippet
res.send
expects the content to be sent. You're sending a path. If you want to send a document, use res.sendFile instead.
Check out the docs for res.send and notice that you can only use it to send content and not paths.
Also read the docs for res.sendFile.