Upload file API

Upload file API

I am having a really hard time with the Zoho Creator Upload API. I am trying to upload a pdf file from google drive using the following google app script. I keep getting the following error message {"code":2945,"message":"LESS_THAN_MIN_OCCURANCE"}.

Any insight would be very much appreciated.

Code:

var theFile = {
    'file' : DriveApp.getFileById(fld.fileID).getBlob().getAs('application/pdf')
  };
  
  var formData = {
    
    'authtoken' : 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'recordID' : 'xxxxxxxxxxxxxxxxxxxxxx',
    'applinkname' : 'flow',
    'formname' : 'documents',
    'fieldname' : 'file_upload',
    'filename' :  'myFile.pdf',
    'files' : theFile
    
  };
  
  var options = {

    'method' : 'POST',
    'scope' : 'creatorapi',
    'payload' : formData,
    
  };

  response = UrlFetchApp.fetch('https://creator.zoho.com/api/xml/fileupload/', options);