Get the name of uploaded files

I want to rename the files when uploading

And get the names of the files that were uploaded to save their names in the database
Can you guide me?

2 Replies 1 reply marked as answer

SN Sevvandhi Nagulan Syncfusion Team April 26, 2021 06:05 PM UTC

Hi Davidalams, 


We are currently validating the reported requirement at our end. We will update further details on April 28th,2021. We appreciate your patience until then. 


Regards, 
Sevvandhi N 



SN Sevvandhi Nagulan Syncfusion Team April 28, 2021 04:49 PM UTC

Hi Davidalams, 


Thanks for your patience. 


We checked your query of “Changing the file name in uploader component”. Before uploading the file to the component in the selected event, we can rename the file. The li element will be updated with the new file name, which can also be received on the server side. Please refer to the code below. 

  
<ejs-uploader id="uploadFiles" asyncSettings="@asyncSettings" selected="onFileSelected"></ejs-uploader> 
 
 
<script> 
    function onFileSelected(args) { 
        for (i = 0; i < args.filesData.length; i++) { 
            args.filesData[i].name = args.filesData[i].name + "-modified"; 
        } 
        args.isModified = true; 
    } 
</script> 


Screenshots: 

 


 


Please find the sample below. 




Kindly get back to us for further assistance. 


Regards, 
Sevvandhi N 



Marked as answer
Loader.
Up arrow icon