Hi Naresh,
Greetings from Syncfusion support.
We can rename the filename in the file selected event and set true for modified data to display the file name with modified name in UI, save action and remove action.
Please find the code example and screenshot from below.
|
@Html.AntiForgeryToken()
<div class="upload-wrapper">
<ejs-uploader id="uploadFiles" selected="OnSelect" asyncSettings="@asyncSettings" multiple="false" autoUpload="false" uploading="addTokens" removing="addTokens"></ejs-uploader>
</div>
<script>
function OnSelect(args) {
args.filesData[0].name = args.filesData[0].name + getGUID(); // Change the file name with generated GUID
args.isModified = true; // Set the modified data as true
}
function getGUID() { // Generate the GUID
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
</script> |
Screenshot:
UI:
Save Action:
Remove Action:
Please find the sample from the below link.
Regards,
Berly B.C