How to add authentication headers and additional data in RichTextEditor

Answer:

We can add the Authentication headers and additional data in the headers using the BeforeUploadImage SfRichTextEditor event.

@using Syncfusion.Blazor.RichTextEditor 

 

    <SfRichTextEditor> 

        <RichTextEditorEventsBeforeUploadImage="BeforeUpload"></RichTextEditorEvents> 

        <RichTextEditorImageSettingsSaveUrl="api/Image/Save"Path="./Files/"/> 

        Syncfusion Rich Text Editor 

    </SfRichTextEditor> 

<br/> 

 

@code{ 

 

    publicvoid BeforeUpload(ImageUploadingEventArgs args) 

    { 

        // Adding Headers  

        args.CurrentRequest = new List<object> { new { Authorization = "Syncfusion Test" } }; 

 

        // adding custom Form Data  

        args.CustomFormData = new List<object> { new { page = "Testing" } }; 

    } 

} 


Find the sample to add authentication headers and additional data in RichTextEditor from here.


Loader.
Up arrow icon