How to check & confirm if dropzone is actually sending file to server

593 views Asked by At

I am using dropzonejs and using following code to initialize dropzone:

var myDropzone = new Dropzone("div#myId", { url: "/file/post"});

On the server side, I am using expressjs\nodejs & using following code:

fs.readFile(req.files.displayImage.path, function (err, data) {
  // ...
  var newPath = __dirname + "/uploads/uploadedFileName";
  fs.writeFile(newPath, data, function (err) {
    res.redirect("back");
  });
});

problem is req.files is always coming as undefined.

I want to know when we upload a file, is there a way through developertoolbar to check the payload & confirm whether file is been sent or not?

0

There are 0 answers