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

How do I turn off the drag and drop feature of the Uploader control?

When using form uploading with the Uploader control the sequential dragging and dropping of multiple files does not work correctly, only the last file is uploaded.
I would like to turn off drag and drop so that users don't think they can pick and drop files from multiple places and drop the on the uploader.

How do I turn that off?

1 Reply

NP Narayanasamy Panneer Selvam Syncfusion Team September 12, 2019 09:14 AM UTC

Hi John,


 
Greetings from the Syncfusion support. 


 
Currently we don’t have support to disable the drag and drop option in our Uploader component. So, we have logged the requested requirement as a feature at our end and this support will be available in any of our upcoming Volume releases.

You can track the status of the requested feature from the below feedback link.

Feedback link: https://www.syncfusion.com/feedback/8632/provide-support-for-enable-disable-the-drag-and-drop-option-in-uploader

Task ID: https://syncfusion.atlassian.net/browse/EJ2-31022?oldIssueView=true 

Until then, we suggest you to use the below work around solution to achieve the requirement as mentioned in the below code example. Here, we have cancelled the drag and drop option in the select event.

[index.cshtml
@Html.EJS().Uploader("UploadFiles").Selected("onSelect").AsyncSettings(new Syncfusion.EJ2.Inputs.UploaderAsyncSettings { SaveUrl = "https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save", RemoveUrl = "https://aspnetmvc.syncfusion.com/services/api/uploadbox/Remove" }).Render() 
  
<script> 
    function onSelect(e) { 
        if (e.event.type == "drop") { 
            e.cancel = true; 
        } 
    } 
</script> 
 
Regards,  
Narayanasamy P.  


Loader.
Live Chat Icon For mobile
Up arrow icon