Skip to content

Commit b7da10e

Browse files
971624: Corrected the event name added in the Secure image upload with authenticatio-HF/Core/MVC1
1 parent c03d866 commit b7da10e

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

ej2-asp-core-mvc/code-snippet/rich-text-editor/image-authenticate/razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@Html.EJS().RichTextEditor("editor").ToolbarSettings(e => e.Items((object)ViewBag.items)).InsertImageSettings(obj => obj.SaveUrl("/Home/SaveFiles").FileUploading("onFileUploading").Path("../Files/")).Render()
1+
@Html.EJS().RichTextEditor("editor").ToolbarSettings(e => e.Items((object)ViewBag.items)).InsertImageSettings(obj => obj.SaveUrl("/Home/SaveFiles").ImageUploading("onImageUploading").Path("../Files/")).Render()
22

33
<script>
4-
function onFileUploading(args) {
4+
function onImageUploading(args) {
55
var accessToken = "Authorization_token";
66
// adding custom Form Data
77
args.customFormData = [{ 'Authorization': accessToken }];

ej2-asp-core-mvc/code-snippet/rich-text-editor/image-authenticate/tagHelper

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<ejs-richtexteditor id="editor" fileUploading="onFileUploading">
1+
<ejs-richtexteditor id="editor" ImageUploading="onImageUploading">
22
<e-richtexteditor-insertimagesettings saveUrl="/Home/SaveFiles" path="./Files/"></e-richtexteditor-insertimagesettings>
33
<e-richtexteditor-toolbarsettings items="@ViewBag.items"></e-richtexteditor-toolbarsettings>
44
</ejs-richtexteditor>
55

66
<script>
7-
function onFileUploading(args) {
7+
function onImageUploading(args) {
88
var accessToken = "Authorization_token";
99
// adding custom Form Data
1010
args.customFormData = [{ 'Authorization': accessToken }];

ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.MVC/insert-image-media/insert-images.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,13 @@ N> The runnable demo application is available in this [Github](https://github.co
109109

110110
### Image Renaming Feature
111111

112-
You can use the [InsertImageSettings](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditorImageSettings.html#Syncfusion_EJ2_RichTextEditor_RichTextEditorImageSettings) property, to specify the server handler to upload the selected image. Then by binding the [FileUploadSuccess](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.richtexteditor.richtexteditor.html#Syncfusion_EJ2_RichTextEditor_RichTextEditor_FileUploadSuccess) event, you can receive the modified file name from the server and update it in the Rich Text Editor's insert image dialog.
112+
You can use the [InsertImageSettings](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditorImageSettings.html#Syncfusion_EJ2_RichTextEditor_RichTextEditorImageSettings) property, to specify the server handler to upload the selected image. Then by binding the [ImageUploadSuccess](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditor.html#Syncfusion_EJ2_RichTextEditor_RichTextEditor_ImageUploadSuccess) event, you can receive the modified file name from the server and update it in the Rich Text Editor's insert image dialog.
113+
114+
Refer the section [Rename images before inserting it in Rich Text Editor](https://ej2.syncfusion.com/aspnetmvc/documentation/rich-text-editor/how-to/rename-images-in-server) for code snippets and examples.
113115

114116
### Secure Image Upload with Authentication
115117

116-
You can add additional data with the image uploaded from the Rich Text Editor on the client side, which can even be received on the server side. By using the [FileUploading](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.richtexteditor.richtexteditor.html#Syncfusion_EJ2_RichTextEditor_RichTextEditor_FileUploading) event and its `CustomFormData` argument, you can pass parameters to the controller action. On the server side, you can fetch the custom headers by accessing the form collection from the current request, which retrieves the values sent using the POST method.
118+
You can add additional data with the image uploaded from the Rich Text Editor on the client side, which can even be received on the server side. By using the [ImageUploading](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditor.html#Syncfusion_EJ2_RichTextEditor_RichTextEditor_ImageUploading) event and its `CustomFormData` argument, you can pass parameters to the controller action. On the server side, you can fetch the custom headers by accessing the form collection from the current request, which retrieves the values sent using the POST method.
117119

118120
> By default, it doesn't support the `UseDefaultCredentials` property, you can manually append the default credentials with the upload request.
119121

ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.NETCORE/insert-image-media/insert-images.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,13 @@ Set the [insertImageSettings.saveFormat](https://help.syncfusion.com/cr/aspnetco
109109

110110
### Image Renaming Feature
111111

112-
You can use the [insertImageSettings](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditorImageSettings.html#Syncfusion_EJ2_RichTextEditor_RichTextEditorImageSettings) property, to specify the server handler to upload the selected image. Then by binding the [fileUploadSuccess](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.richtexteditor.richtexteditor.html#Syncfusion_EJ2_RichTextEditor_RichTextEditor_FileUploadSuccess) event, you can receive the modified file name from the server and update it in the Rich Text Editor's insert image dialog.
112+
You can use the [insertImageSettings](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditorImageSettings.html#Syncfusion_EJ2_RichTextEditor_RichTextEditorImageSettings) property, to specify the server handler to upload the selected image. Then by binding the [ImageUploadSuccess](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditor.html#Syncfusion_EJ2_RichTextEditor_RichTextEditor_ImageUploadSuccess) event, you can receive the modified file name from the server and update it in the Rich Text Editor's insert image dialog.
113+
114+
Refer the section [Rename images before inserting it in Rich Text Editor](https://ej2.syncfusion.com/aspnetcore/documentation/rich-text-editor/how-to/rename-images-in-server) for code snippets and examples.
113115

114116
### Secure Image Upload with Authentication
115117

116-
You can add additional data with the image uploaded from the Rich Text Editor on the client side, which can even be received on the server side. By using the [fileUploading](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.richtexteditor.richtexteditor.html#Syncfusion_EJ2_RichTextEditor_RichTextEditor_FileUploading) event and its `customFormData` argument, you can pass parameters to the controller action. On the server side, you can fetch the custom headers by accessing the form collection from the current request, which retrieves the values sent using the POST method.
118+
You can add additional data with the image uploaded from the Rich Text Editor on the client side, which can even be received on the server side. By using the [ImageUploading](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditor.html#Syncfusion_EJ2_RichTextEditor_RichTextEditor_ImageUploading) event and its `customFormData` argument, you can pass parameters to the controller action. On the server side, you can fetch the custom headers by accessing the form collection from the current request, which retrieves the values sent using the POST method.
117119

118120
> By default, it doesn't support the `UseDefaultCredentials` property, you can manually append the default credentials with the upload request.
119121

0 commit comments

Comments
 (0)