Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. exports.verReglamento = function(req, res) {
  2. models.regla.findOne({
  3. where: { id: req.params.id }
  4. }).then(Reglamento => {
  5. var filePath = "../../public/uploads/index/conocenos/reglamentos/constancia.pdf";
  6.  
  7. fs.readFile(filePath , function (err,data){
  8. res.contentType("application/pdf");
  9. res.send(data);
  10. });
  11. }).catch(err => {
  12. res.json(err);
  13. })
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement