I am trying to upload a file using the ReactJS file upload wrapper, the file should be uploaded to a MVC netcore controller. My is like:
class ReconcileFile extends React.Component { constructor(props) { super(props); this.async = { saveUrl: "/reconcile/UploadFile", removeUrl: "http://my-app.localhost/remove", autoUpload: false } } render() { return ( <div> <Upload async={this.async} /> </div> ); }}And my controller is:
[HttpPost] async public Task<IActionResult> UploadFile([FromForm] IFormFile files) {}
The value of files is always null. I have tried with/without the FromFile attribute and have also tried using IEnumerable<IFromFile> as the receiving type.
Any ideas?
