Navigation

Monday, 9 February 2015

Restrict Particular File Types to upload in SharePoint

Restrict Particular File Types to upload in SharePoint
Recently I met through a requirement where I had to restrict to upload a particular file to upload in SharePoint. As our requirement was to prevent to upload one or more file types in site so we think to write an Event receiver. But after a little study, I found it can be done OOB from Central Admin Page.
I am going to demonstrate this step by step
Step 1: Open SharePoint Central Administration
Step 2: In the Central Administration Page Click Security
Step 3:On the Security Page Select Define blocked files type
Step 4: Select the web application, for which you have to apply file upload restriction
Step 5: Scroll down the section “Type each file extension on a separate line”
Step 6: Add the file type you have to restrict (say htm and html)
Step 7: Finally click OK
Step 8: Now move to the site for which you have restricted the file and try to upload a file with the same extension (Say .html).
You will find that you are unable to upload the particular file type and an error message will prompt as above.
Conclusion: Each Web application maintains a list of blocked file types that is based on file name extensions and We can restrict certain file types to uploaded or downloaded on a particular site