Build REST API with Node Express MongoDB - Image Upload using Multer #42

preview_player
Показать описание
In this video you will learn how to upload images using multer package in node express.

#node #express #debugger #npm #multer

React tutorials:

Angular Tutorials:

Tech Tutorials - Random:

Contact us for development services:
Рекомендации по теме
Комментарии
Автор

Can u add video for swagger, redis and deployment

pranavverma
Автор

pls help me!!!, how can i showing off these images in my handlebars-html( it´s does wrong).


app.post("/Data", (req, res)=>{

const novaPostagem = {
titulo:req.body.titulo,
descricao:req.body.descricao,
comentario:req.body.comentario,
image:req.body.image
}

new
console.log("salva com sucesso!!!"+ req.body.image)
}).catch((err)=>{
console.log("erro ao salva:"+err)
})
})

{{#each Postagem}}

<div class="card mt-2">
<ul>
<a
<small>{{descricao}}</small>
</ul>
<hr>
<img src="{{image}}" alt="image" style="width: 200px;">
</div>

{{else}}
<div class="card">
<h4>nada encontrado!!!</h4>
</div>
{{/each}}

the image code is save this form in my mongodb:

image: BinData(0, 'bGy9nuyubzIuc99G5n')

vitorsanto