title: Cloudinary File Upload Error
body: <p>I'm writing a REST API on using Express.js. The API needs to accept a video file from the client and upload it to cloudinary. When I use the api to return the file back to the client (as a test) everything works perfectly. When I then try to upload the same file to cloudinary I get an error. the error says: </p>
  
  <pre><code>"file.match is not a function"
  </code></pre>
  
  <p>I'm not sure what file.match even is or why it is giving me a problem. If anyone else has had this issue how did you solve it?
  Below is the code that is giving me issues:</p>
  
  <p>app.js</p>
  
  <pre><code>var express = require('express');
  var formidable = require('express-formidable');
  var app = express();
  
  app.use(formidable());
  
  var routes = require('./routes');
  app.use('/routes', routes);
  
  var port = process.env.PORT || 3000;
  
  app.listen(port, function() {
    console.log('Express server is listening on port ' + port);
  });
  </code></pre>
  
  <p>routes.js</p>
  
  <pre><code>var express = require('express');
  var cloudinary = require('../cloudinary.js').cloudinary;
  var router = express.Router();
  
  router.post('/upload', function(req, res, next) {
    cloudinary.uploader.upload(req.files, function(result) {
      console.log(result);
    });
  });
  
  module.exports = router;
  </code></pre>
  
  <p>cloudinary.js</p>
  
  <pre><code>var cloudinary = require('cloudinary');
  
  cloudinary.config({
    cloud_name: 'name',
    api_key: 'key',
    api_secret: 'secret'
  });
  
  module.exports.cloudinary = cloudinary;
  </code></pre>