We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Display files

Hello,

How to display already uploaded files in uploadbox control.

3 Replies

KR Keerthana Rajendran Syncfusion Team May 26, 2017 04:26 AM UTC

Hi Kuntal,  

Thank you for contacting Syncfusion support.  

The purpose of Upload box is to upload the selected file to the mentioned path and the selected files will be present in the destination folder. So please confirm us whether you are expecting control similar to the below link so that we could proceed further  

File Explorer: http://mvc.syncfusion.com/demos/web/fileexplorer/default

Regards,
Keerthana R. 



KP Kuntal Patel May 26, 2017 06:34 AM UTC

Thanks for the response Keerthana. Though it is related to the question,i would say it's too broad. It's much more than what is expected. All we need is just the name of the file listed somewhere e.g. below the control(Nice to have).

Currently,i'm doing this by placing gridview below the control. Its very basic that file listing is a part of the file control.


PO Prince Oliver Syncfusion Team May 29, 2017 05:56 AM UTC

Hi Kuntal,   
  
Thank you for your update.   
  
As per your requirement, we have prepared a sample to display uploaded file details like the below upload box control. We have used the client side Success event to get the uploaded file details and append it to <div> element. Kindly refer to the following code snippet.   

@Html.EJ().Uploadbox("UploadDefault").SaveUrl("SaveDefault").RemoveUrl("RemoveDefault").ClientSideEvents(e => e.Success("fileselect")) 
 
<script> 
        var count = 1; 
        function fileselect(args){ 
            debugger; 
            $("#details").append("<div><span>" + count + "). " + args.files.name + "</span> - <span>" + ((args.files.size) / 1024).toFixed(2) + " KB</span</div>"); 
            count++; 
        } 
</script> 


Regards, 
Prince 


Loader.
Up arrow icon