Dropzone image upload html error display how to remove error I want to remove HTML data in popup after upload img or other document in Dropzone
<form action="/admin/products/product-gallery/<%= id %>" method="post" enctype="multipart/form-data"
class="dropzone" id="dropzoneForm">
<div class="fallback">
<input type="file" name="file" multiple>
<input type="submit" value="Upload">
</div>
</form>
Dropzone image upload html error display how to remove error
Dropzone.options.dropzoneForm = {
acceptedFiles:'image/*',
init:function(){
this.on("queuecomplete",function(file){
setTimeout(function(){
location.reload()
},1000);
});
}
router.get('/product-gallery/:id',function(req,res){
var productImage = req.files.file;
var id = req.params.id;
var path = 'public/product_images/' + id + '/gallery/thumbs/' + req.files.file.name;
var thumbsPath = 'public/product_images/' + id + '/gallery/thumbs/'+ req.files.file.name;
productImage.mv(path,function(err){
if(err)
console.log(err);
});
});
**the error show me that urlpost it;s not valid but i sure its a valid **
My problem its solved i changed from router.get To router.post