Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.