Disable drag and drop files option in Document Library in SharePoint 2013

In this hint, I will show How to

Hide  + new document and disable drag and drop files option in Document Library in SharePoint.

disable drag and drop files option in Document Library in SharePoint

Note: You can easily remove the +New and drag and drop option from document library by set toolbar type as ‘No Toolbar’ as below shown. but the purpose of this post is to disable drag and drop files option in Document Library.

disable drag and drop files option in Document Library in SharePointSteps

  • Open the document library via browser > Edit Page.

Hide  + new document and disable drag and drop files option

  • Add Script Editor > Edit Snippet.

Hide  + new document and disable drag and drop files option

  • Add the following Code.
<script type="text/javascript">
// Stop Drag & Drop
ExecuteOrDelayUntilScriptLoaded(function () {
g_uploadType = DragDropMode.NOTSUPPORTED;
SPDragDropManager.DragDropMode = DragDropMode.NOTSUPPORTED; }, "DragDrop.js");
</script>
<style>
#Hero-WPQ2 {
display: none ! important;
}
</style>

  •  Stop Editing.

OutPut Disable drag and drop files option in Document Library in SharePoint 2013.gifTry ow to drag a file to the Document library, that should not be added to the document library.disable drag and drop files option in Document Library


Applies To
  • SharePoint 2016.
  • SharePoint 2013.
  • SharePoint 2010.
Advertisements

3 thoughts on “Disable drag and drop files option in Document Library in SharePoint 2013

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s