Syncfusion how to get file details after upload in ASP.NET Core

80 views Asked by At

I have a Syncfusion File Uploader and I want to get file details like new file name after upload. But apparently there is no way to get the uploaded file information.

@{
    var asyncSettings = new Syncfusion.EJ2.Inputs.UploaderAsyncSettings { SaveUrl = "/Student/Save" };
}

<ejs-uploader id="UploadFiles" asyncSettings="@asyncSettings" dropArea=".control-fluid" multiple=false autoUpload=false></ejs-uploader>

And in StudentController, I have this method:

  public void Save(IList<IFormFile> UploadFiles)
  {
      //File upload code
      Response.Headers.Add("documentname", newFileName);
  }

The name of the file before uploading to the server is changed in a variable named newFileName and I want to have this name in the client.

Note: the uploader (ejs-uploader) is in a modal form and the page should not be refreshed

0

There are 0 answers