React wrapper Upload control to netcore MVC controller

2 posts, 0 answers
  1. Keith
    Keith avatar
    5 posts
    Member since:
    Dec 2017

    Posted 06 Feb 2018 Link to this post

    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) {
            this.async = {
                saveUrl: "/reconcile/UploadFile",
                removeUrl: "http://my-app.localhost/remove",
                autoUpload: false          
        render() {
            return (
                    <Upload async={this.async} />

    And my controller is:

            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?

  2. Stefan
    Stefan avatar
    3012 posts

    Posted 08 Feb 2018 Link to this post

    Hello, Keith,

    Thank you for the information.

    I can suggest checking our MVC demo of the Upload, where the expected Controller configuration can be observed inside the AsyncController.cs file:

    If the value is still coming as null, please provide an example and I will gladly investigate further.

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top