SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know I can block certain types of files from uploading for all document libraries but I was thinking how can I block it for a specific document library.

share|improve this question
up vote 1 down vote accepted

The first thing that comes to mind would be to create an Event Receiver and hook into the ItemAdding() event. That would let you test the file prior to it being added to the library so that you can reject it if it is not an approved extension.

There is probably a way to do this via Workflow as well but that isn't as clean of a solution.

share|improve this answer

There is the same question. As Dave Wise said the simplest way is to use Event Reseiver. You can see this example to undestand how to use it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.