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 2013.hide-new-document-and-drag-and-drop-files-option-in-document-library-in-sharepoint-2013

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 hint is to disable drag and drop files option in Document Library.

Toolbar typeSteps:

  • Open the document library via browser > Edit Page.Edit Page
  • Add Script Editor > Edit Snippet.

Script Editor.gif

  • Add the following Code.
<script type="text/javascript">
// Stop Drag & Drop 
ExecuteOrDelayUntilScriptLoaded(function () { 
g_uploadType = DragDropMode.NOTSUPPORTED; 
<code>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 to drag a file to the Document library , that should not be added to the document library.disable-drag-and-drop-filesEnjoy 🙂

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s