I am trying to upload images to cloudinary using react front-end and express server. The problem is i cant properly post request image to my express server.
This is how i prepare image to send it later:
          var data = new FormData();
          console.log(event.target.files[0]) // this prints FileObject succesfully
          data.append('image', event.target.files[0]);
         console.log(data) // this prints {} but i guess its natural since its FormData ??
          this.imageToUpload = data;
This is how i post request:
 axios.post('/api/courses/uploadImage',this.imageToUpload, {
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
    .then( (response) => {
      alert(JSON.stringify(response));
    })
    .catch(function (error) {
      console.log(error);
    });
Now in server side,req.body is empty.
router.post("/courses/uploadImage",(req,res,next)=>{
    console.log(req.body) // empty
    var image = req.body;
   cloudinary.uploader.upload(image, function(error, result) { console.log(result) });
  })
Also what should i really put to first parameter of(image in this case) uploader.upload ? 
 
     
    