Upload File & Data Problem

Upload File & Data Problem

I'm using FilePond & it passes the file to you in a function.  I'm trying to do a simple file upload w/ additional upload data.  Here's my js:

  1. function fpUpload(fieldName, file, metadata, load, error, progress, abort) {
  2.           console.log('InsideFP-Upload: ' , upload); // set further up
  3.           console.log('InsideFP-File: ' , file);
  4.           var obj_data = {};
  5.           obj_data['upload'] = upload;
  6.           obj_data['myfile'] = file;
  7.           var imgData = new FormData();
  8.           $.each(obj_data, function(k, v) {
  9.        console.log(['Key, Value & myfilecheck: ', k, v, k == 'myfile']);
  10.        if (k == 'myfile') {$.each(v, function(i, file) {imgData.append(k, file)})}
  11.        else {imgData.append(k, v)}
  12.   });
  13.   $.ajax({
  14.             url: 'path/uploadimg.php', // get img url
  15.             data: imgData,
  16.             dataType : 'json',
  17.             contentType: false,
  18.             processData: false,
  19.             type: 'POST'
  20.           })
  21.           .done(function(data) {
  22.             if (data.success == true) {
  23.               // Call the progress method to update the progress to 100% before calling load
  24.               // Setting computable to false switches the loading indicator to infinite mode
  25.               // (computable, processedSize, totalSize)
  26.               progress(true, 0, 1024);
  27.               // Call the load method when done and pass the returned server file id
  28.               // the load method accepts either a string (id) or an object
  29.               // the unique server file id is used by revert and restore functions
  30.               load('unique-file-id');
  31.             }
  32.           })
  33.           .fail(function(data) {
  34.             if (data.success == false) {
  35.               console.log('ImgFailMessage: ' + data.message); 
  36.               // Call the error method if something is wrong, should exit after
  37.               error('Error occurred');
  38.             }
  39.           });
  40.           // Abort method so the request can be cancelled by user
  41.           return {
  42.             abort: function() {
  43.               // User tapped abort, cancel ongoing actions here
  44.               // Let FilePond know the request has been cancelled
  45.               abort();
  46.             }
  47.           };
  48.  }
Here's the console output - I think it looks ok at this point?