title: The "path" argument must be of type string or an instance of Buffer or URL cloudinary and nodejs
body: <p>I am trying to create a method that client can upload image from front end to back end server and then store the images to cloudinary but I end up getting this error:</p>
  <blockquote>
  <p>TypeError [ERR_INVALID_ARG_TYPE]: The &quot;path&quot; argument must be of type
  string or an instance of Buffer or URL. Received undefined</p>
  </blockquote>
  <p>Here is my backend code base:</p>
  <pre><code>const express = require(&quot;express&quot;);
  const router = express.Router();
  const { catchErrors } = require(&quot;../errors/errorHandlers&quot;);
  const { body } = require(&quot;express-validator&quot;);
  const multer = require('multer');
  const cloudinary = require('cloudinary').v2;
  const streamifier = require('streamifier');
  const storage = multer.memoryStorage();
  const fileUpload = multer({ storage: storage });
  const fs = require('fs'); 
  
  cloudinary.config({
    cloud_name: &quot;xxx&quot;,
    api_key: &quot;xxxx&quot;,
    api_secret: &quot;xxxx&quot;,
  });
  </code></pre>
  <p>this is what I got from console</p>
  <pre><code>Images  {
    file: {
      name: 'me.jpg',
      data: &lt;Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 f0 00 f0 00 00 ff e1 03 78 45 78 69 66 00 00 4d 4d 00 2a 00 00 00 08 00 09 01 0f 00 02 00 00 00 06 00 00 ... 442191 more bytes&gt;,
      size: 442241,
      encoding: '7bit',
      tempFilePath: '',
      truncated: false,
      mimetype: 'image/jpeg',
      md5: 'a01832d1a390b2bcd7e2b6103d68eaa4',
      mv: [Function: mv]
    }
  }
  
  { message: 'Request Timeout', http_code: 499, name: 'TimeoutError' }
  </code></pre>
  <p>How can I fix this problem?</p>