$_FILES is empty after the request is sent, the rest of the data is passed normally in the request, only the files are not sent.
here you can see that FormData receives all data on files
<div class="mb-3 col-3">
<input class="form-control" type="file" multiple name="files[]">
</div>
let files = document.querySelector('input[name="files[]"]').files
for (let i = 0; i < files.length; i++) {
Data.append(files[i].name,files[i],files[i].name)
}
let Data = new BX.ajax.FormData()
BX.ajax.runComponentAction('dev:SendForm', 'sendForm',{
mode: 'class',
method: 'POST',
data: {data:data},
}).then(data => {
console.log(Data)
}, (reason) => {
console.log(Data)
}).catch((error) => {
console.log(Data)
})
})
I tried to change the title to multiple/formdata, but there I had to manually generate a boundary and I didn’t engage in such nonsense