Uploading image file to php server [duplicate]

I am developing a simple registration system, with javascript, Ajax and php. I am having problem with uploading the picture of the registrant to the server. I have 2 url parameters that were passed to the server. All colected info are passed as single JSON object, second parameter is object containing the image file.
I am stuck on server side where my PHP script should parse received parameters and store them in the database. JSON object is processed with no issues, however the image object is one that is causing me all the grief. Any help or tip of what i am doing wrong would be appreciated.

Here is how i get image file:

<div class="custom-file">  
 <input type="file" class="custom-file-input" id="user_picture" aria-describedby="user_picture" required>  
 <label class="custom-file-label" for="user_picture"> Choose file </label>  
</div> 

Here is my javascript that sends file to the server:

var files = document.getElementById("user_picture").files;

// Create formData object
var formData = new FormData();

// Might or not be a multi file input, so loop through it
for (var i = 0; i < files.length; i++) {
  var file = files[i]

  formData.append('upfile', file);
}
// Url parameters
var t_params = "otsl_action=player_reg&otsl_data=" + JSON.stringify(regDataObj) + '&player_image=' + formData;
pbc_env = window.location.protocol + "//" + document.location.hostname;

var url = pbc_env + "/otsl_api.php?" + t_params;
var result_obj = '';
$.getJSON(url, function(result) {
  for (var i in result) {
    if (result.hasOwnProperty(i)) {
      console.log("Got result: " + result.success + " Message: " + result.message);
      result_obj = result;
      break;
    }
  }

I tried with JSON call and Ajax with same result.

The PHP script gets two parameters and assigns them to the PHP variables:

$otsl_data = $_GET['otsl_data'];
$player_image = $_GET['player_image'];
$otsl_data = isset($otsl_data)?$otsl_data:$_REQUEST['otsl_data'];
$player_image = isset($player_image)?$player_image:$_REQUEST['player_image'];

Then try to process them in the specific function:

  protected function setRegistration($parameters) {
    $p_registration_data = $parameters['otsl_data'];
    $p_registrationObj = json_decode($p_registration_data, false);
    $player_image  = $parameters['player_image'];

Does not what i tried – could not get the way to access object ($player_image) and have file uploaded.

How should i the image?