Sharepoint - How to restrict a document library to a specific file type (extension)?

there is no OOB solution for this. But you could create an eventhandler (event receiver) and triggers on item adding, that checks the file name and if it's not the correct file extension just cancel event. /WW


If you prefer not to deploy any of your own custom code to your WFEs then you may want to consider a simple SharePoint Designer workflow as well.

Have a look at this article that describes something similar and can easily be adapted (it renames a file from a workflow when it contains sensitive information in the file name).

Providing feedback to the customer is indeed a problem. An event receiver allows you to provide slightly better feedback than a workflow, but only slightly. SharePoint 2010 allows event receivers to provide better feedback.


I know its not what you ask for, but for completeness i want to add that you can deny files by extension in Central Administration if you are using MOSS.

Manage blocked file types (Office SharePoint Server)

Anders Rask

Tags:

Document