Here are snippets of code which help you to send files asynchronously to ASP.NET Core:

HTML:

<input type="file" id="fileInput" multiple />

JavaScript:

var element = document.getElementById('fileInput');

var formData = new FormData();
formData.append('files', element.files[0]);

var request = new XMLHttpRequest();
request.open("POST", "http://localhost/api/FileUploader/File"); // change to your URL
request.send(formData);

API Controller

    [Route("api/[controller]")]
    public class FileUploaderController : Controller
    {
        [HttpPost("File")]
        public void File(ICollection<IFormFile> files)
        {
             //handle your files here
        }
    }