I have a problem. formData.append("id_element",1) doesn`t add the field into formData. I have found a lot of solves but in my case it doesn`t work right. 
PHP code here:
var_dump($_FILES);
$("#hw-upload_image-form").submit(function(e) {
        e.preventDefault();
        var formData = new FormData(this);
        formData.append("id_element",1); // doesn`t work here
        $.ajax({
            type:"POST",
            processData: false,
            contentType: false,
            cache: false,
            url:$(this).prop('action'),
            data:formData,
            success:function (data) {
                console.log(data); // show returned data from php
            }
        });
});<form action="action.php"  method="post" enctype="multipart/form-data" id="hw-upload_image-form">
    <input type="file" name="hwImage"> <!-- hw = homework (just for you :) -->
</form>Result (from the console)
array(1) {
  ["hwImage"]=>
  array(5) {
    ["name"]=>
    string(70) "73b38ef5d1f5849ea800c18990acde94_ce_1920x1200x0x0_cropped_800x427.jpeg"
    ["type"]=>
    string(10) "image/jpeg"
    ["tmp_name"]=>
    string(36) "D:\OSPanel\userdata\temp\php9F48.tmp"
    ["error"]=>
    int(0)
    ["size"]=>
    int(68411)
  }
}
 
    