I have a RichTextEditor component with insertImageSettings { saveUrl: ... }:
var RichTextEditor = new ej.richtexteditor.RichTextEditor({
height: "95%",
enablePersistence: false,
enableHtmlSanitizer: false,
insertImageSettings: {
saveUrl: 'https://docs.dpiserve.com:20410/api/v1/PJMDocs/SaveImage',
},The API endpoint works and is hit when an image is inserted into the editor.
It only started working when I set the API method to use [FromForm]:
[HttpPost("SaveImage")]
public IActionResult SaveImage([FromForm] object? uploadFiles)
I have tried various types in place of "object?" including just a string? variable as well as a record object.
In each case the incoming argument is null. If I use anything other than [FromForm] then I get a media type error returned from the API endpoint.
I also have not found an definition for the UploadFiles object that is supposed to be sent with the image save request.
So my two questions are:
- Why is the argument to the API call coming in as null?
- What is the UploadiFile object supposed to look like when it is received?
Thank you.