Pages

Tuesday, October 2, 2012

Disable Multiple File Upload on SharePoint 2007

Sometimes you have to prevent users from uploading multiple files into a document library. For example, you have a custom Edit form and you don't want users to bypass it which is what SharePoint allows them to do when uploading multiple files, even if some fields in a document library are mandatory.

I thought it's an easy task as there is the Upload.aspx file in the Forms folder in each document library. That file has a JavaScript function responsible for multiple file uploads, so you can easily edit that and make it behave as you like. Wrong!

The thing is that Upload.aspx seems to be never used in reality as SharePoint will keep redirecting you to the _layouts/Upload.aspx page, which in its turn can be edited as well, but resides on the server and changes to it would affect the whole farm. This post has more details on why this is happening. 

I've spent some time searching for a solution and the easiest I've found was to amend site's CSS to hide unnecessary controls.

All you have to do is to add the following lines into the file:


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

The cool thing is that this will not only remove the Upload multiple files link from the upload page, but will also disable the feature within a document library. And it applies on a site level only, so you can leave the rest of your farm intact.

You can achieve the same by other means, but they all about code and amending server files which is not usually acceptable on a large farm.

2 comments:

  1. Nice blog..! I really loved reading through this article. Thanks for sharing such an amazing post with us and keep blogging...Well written article Thank You for Sharing with Us pmp training centers in chennai| pmp training in velachery | project management courses in chennai |pmp training in chennai | pmp training institute in chennai

    ReplyDelete
  2. Hey, Wow all the posts are very informative for the people who visit this site. Good work! We also have a Website. Please feel free to visit our site. Thank you for sharing.
    Be Your Own Boss! If you're looking for a change in your work prospects, then let's prepare for your career from here!!!
    Self Employment | Women Development | Information Technology | Engineering Courses

    ReplyDelete