Not understanding how to integrate GridFS with MongoDB

So I am having a small error on how to integrate Mongodb GridFS with my NextJS api page - which is designed to upload images as well as create a new document.

The stage that I am stuck at is how do I get the data into MongoDB GridFS.

I am using formidable which is a nodeJS plugin to read form data including FILES.

  const form = new formidable.IncomingForm();
  //const uploadFolder = path.join(__dirname, 'public','files');

  form.uploadDir = "public/files";
  form.keepExtensions = true;
  form.parse(req, (err, fields, files) => {
    var file = files.file
        const newFile = File.create({

The above code works by putting the temp file in public/files directory - So I know I am going to have to read this data?

I am wondering if anyone else has worked with formidable and MongoDB for file uploads.

I posted this question on StackOverflow as well, any help would be great.