How can I modify the upload name when I customize the upload URL?
How can I reset the parameters obtained after uploading and set the src of the image?
SIGN IN To post a reply.
5 Replies
XZ
xu zhi bin
December 9, 2022 07:09 AM UTC
<ejs-richtexteditor :toolbarSettings="toolbarSettings" v-model="model.Content" :insertImageSettings="insertImageSettings" ref="defaultRTE" :height="400">
</ejs-richtexteditor>
toolbarSettings: {
type: 'MultiRow',
items: ['Bold', 'Italic', 'Underline', 'StrikeThrough',
'FontName', 'FontSize', 'FontColor', 'BackgroundColor',
'LowerCase', 'UpperCase', '|',
'Formats', 'Alignments', 'OrderedList', 'UnorderedList',
'Outdent', 'Indent', '|',
'CreateLink', 'Image', '|', 'ClearFormat', 'Print',
'SourceCode', 'FullScreen', '|', 'Undo', 'Redo'
]
},
insertImageSettings: {
saveUrl: 'https://************/api/UploadCf?dir=',
allowedTypes: ['.jpg','.png'],
},
VJ
Vinitha Jeyakumar
Syncfusion Team
December 12, 2022 07:36 AM UTC
Hi xu zhi bin,
By using the insertImageSettings property, you can specify the server handler to upload the selected image. Then you can bind the imageUploadSuccess event, to receive the modified file name from the server and update it in the Rich Text Editor’s insert image dialog.
Documentation: https://ej2.syncfusion.com/vue/documentation/rich-text-editor/how-to/rename-images-in-server/
Regards,
Vinitha
XZ
xu zhi bin
December 13, 2022 02:20 AM UTC
I want to change the name of the uploaded file.
It seems that insertImageSettings cannot modify the name of the uploaded file?
VJ
Vinitha Jeyakumar
Syncfusion Team
December 13, 2022 12:28 PM UTC
Hi xu,
If you want to change the text "UploadFiles". you can modify the name attribute of the Uploader control in the dialogOpen event of the Rich Text Editor. please check the code below,
Code snippet:
| <ejs-richtexteditor ref="rteObj" :toolbarSettings="toolbarSettings" :valueTemplate="vueTemplate" :dialogOpen="open" :height="400"> </ejs-richtexteditor>methods: { open: function(e) { // here you can pass the text you want document.getElementsByClassName("e-uploader")[0].name = "FilesUploaded"; } }, |
If it is not your requirement, please share us with your exact requirement and use case scenario for our better understanding.
Regards,
Vinitha
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
XZ xu zhi bin
- Dec 9, 2022 07:08 AM UTC
- Dec 13, 2022 12:28 PM UTC