SharePoint: How to limit file type in Document library to accept only pdf files

This post is also available in: Slovenian

Limit file type in Document library to accept only pdf file in SharePoint

In Enterprise SharePoint portal I create Document Library with daily incoming email with attached pdf file from clipping service company.

Sharepoint_wheelUnfortunately in email’s body is inserted logo of the clipping company, so SharePoint consider logo image file as attachment as well. So now every time email came, 2 items are created in Document Library; one pdf file and one image file.

The easiest way is to create workflow, who check file type. Workflow started automated when new item is created. It’s modified to accept only pdf files and no other file type.

There’s a little problem, because Workflow started only when new item is created and if users are subscribe to Alerts for this Document library, they get email alert about new item before workflow delete image file. But if you put that if non pdf file is uploaded its status is not approved, Alerts are not sent to users.


Create Workflow to reject non pdf files in SharePoint Designer:

Step 1

If Current Item: File type not equals pdf

Set content approval status to Rejected

then Delete item in “this list”

Step 2

If Current Item:File type equals pdf

Set content approval status to Approved


Now only pdf files are uploaded in Document Library and logo image is not here any more.


Works as system engineer in Slovenian Enterprise in Microsoft environment focusing on security, deployments, SharePoint, SCCM and CheckPoint firewall. Author of successful blog about IT security, Microsoft tips & tricks, social media, internet trends.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.