Wednesday, January 14, 2015

SharePoint 2013 Hide upload and disable drag drop for document library

Add a script web part with the following:

<style type="text/css">
#Ribbon\.Documents\.New\.AddDocument-Large
{    
               display:none !important;
}
</style>
<style type="text/css">
td.ms-addnew
{    
               display:none !important;
}
</style>

<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(function() {
    g_uploadType = DragDropMode.NOTSUPPORTED;
    SPDragDropManager.DragDropMode = DragDropMode.NOTSUPPORTED;
}, "DragDrop.js");

</script>

No comments:

Post a Comment