Dropzone image upload html error display how to remove error

217 views Asked by At

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

Dropzone image upload html error display how to remove error

    <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 **
1

There are 1 answers

1
Shihabmohamed On

My problem its solved i changed from router.get To router.post