Block multi-document uploads in SharePoint

Block multi-document uploads in SharePointIn SharePoint 2007 when a document library has required columns for metadata or other information the user is prompted to complete the information when a new document is added. However if the user chooses the ‘Upload Multiple Files” option they are not required to populate required columns. After the files are load and a user goes in to edit they will be prompted to fill in the information.

In some cases this may not be an issue but if the library has workflows triggered by column values or views sorted or filtered based on those metadata columns there could be problems. So of course there is use training that can be done to ensure documents are always properly populated with metadata but sometimes that is not enough.

Ricky Deleyos showed me how to with some simple CSS hide the “Upload Multiple Documents” link on Upload.aspx.

.ms-splitbuttondropdown, #ctl00_PlaceHolderMain_ctl01_ctl02_UploadMultipleLink { display: none !important;}

Because Upload.aspx is called from the 12 hive and not from the local site this code needs to be added to your declared CSS and not just referenced using a CEWP or other method. This will hide the link for all libraries on the site using the declared CSS.

There are other ways to solve this problem

These methods all require editing the page itself which can be risky or even impossible given your environment. Especially in large environments where user requirements can vary greatly its best not to make changes that will affect everyone. It’s best to implement solutions that can be isolated to impact only the site or area where they are needed.

SharePoint 2010

In sharepoint 2010 you can use CSS to hide the SilverLight upload control using this css

#idUploadTD {display:none;}

Or you can try adding this code to the site system  masterpage.  This will block multiple document uploads for every library on the site using that masterpage. Thanks to Frank Sailer for the tip.

#ctl00_PlaceHolderMain_ctl01_ctl05_UploadMultipleLink{
display:none;
}
#ctl00_PlaceHolderMain_ctl01_ctl05_OverwriteSingle{
display:none;
}
#ctl00_PlaceHolderMain_UploadDocumentSection_ctl03_UploadMultipleLink{
display:none;
}

davecavins

Dave is a SharePoint developer and graphic designer based in the DC area.

Leave a Reply

Your email address will not be published. Required fields are marked *