I am trying to implement the Open and Save functionality for a Spreadsheet using a .NET WebAPI server. I am able to open a file successfully, but saving it results in my page getting redirected to the WebAPI and returning a 415 (Unsupported Medai Type) error. Any help would be appreciated.
I am using Vue 3 and .NET 6.0. I have installed Syncfusion.EJ2.Spreadsheet.AspNet.Core and Syncfusion.XlsIORenderer.Net.Core.
Vue Code. The Vue application is running on localhost:8087
WebApi Code. The API is running on localhost:7018
After attempting to save, the Vue application redirects to this URL.
SPSangeetha Priya Murugan Syncfusion Team December 7, 2022 12:48 PM UTC
We suspect the cause of this issue is
due to the saveSettings argument not being recognized properly in server
side save actions. So, we suggest you use the [FromBody] or [FromForm] property in the controller action as shown below.
public string Save([FromBody] SaveSettings saveSettings)
public IActionResult Save([FromForm]SaveSettings saveSettings)