I'm using SharePoint Online modernUI.
In our site library, we want to restrict users to uploading only PDF files.
Do you have any ideas to verify file extention when uploading?
I would really appreciate it if you could deal with this matter.
1 Answer
This feature is not yet supported in SharePoint Online.
Please see the SharePoint UserVoice post here: Custom restrictions of file types that user can upload to a document library.
--
As a workaround, you can create a flow to approve only PDF files and reject all other file extensions uploaded to a document library.
UPDATE:
Here is a sample flow for your reference:
Turn on Content Approval for the document library. The flow will delete new uploaded documents that are not PDF files and approve PDF files automatically.
Here is a reference: Require approval of documents in SharePoint using Microsoft Flow.
-
Thank you for your comment. I have a question regarding your workaroud.Does it mean that I can verify the file extension in approval function of flow?– HyontaCommented Jun 4, 2020 at 8:11
-
@Hyonta It is like but not really verification. it doesn’t stop users from uploading files that are not PDF files, but hold the documents uploaded to the library invisible to users other than its creator and all users who can see draft items. I’ve added a screenshot of a sample flow to the answer. Please see the update. Commented Jun 4, 2020 at 9:31
-
I really appreciate it. It's very nice idea. And I have tried it, but It takes about 10 seconds before the file is deleted by flow. So the user thinks it was uploaded. So, it's not realistic. I'll wait for the Microsoft's implementation on this matter. Thank you very very much.– HyontaCommented Jun 5, 2020 at 10:46