You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何利用Microsoft Flow实现SharePoint站点视频文件上传拦截?

Block SharePoint Site Members from Uploading Video Files via Microsoft Flow

Got it, let's walk through refining your Microsoft Flow setup to reliably block video uploads—your core approach is spot-on since SharePoint doesn't have native file-type filtering for uploads. Here's how to make it work smoothly:

Step 1: Set Up the Flow Trigger

  • Start with the When a file is created (properties only) trigger, and select your target SharePoint document library. This ensures the flow fires the moment a new file is added.

Step 2: Add the Content Type Check Condition

  • Insert a Condition action right after the trigger. This is where we'll flag video files:
    • On the left side, select the File Content Type dynamic content pulled from the trigger.
    • Choose the starts with operator.
    • On the right side, paste this expression: @startsWith(triggerBody()?['FileContentType'], 'video/')

    This catches all standard video formats (MP4, MOV, AVI, etc.) since their MIME types all start with video/.

Step 3: Configure the Block Action

  • In the If yes branch of the condition (where the file is a video):
    • Add the Delete file action. Select your SharePoint site and library, then use the File Identifier dynamic content from the trigger to target the uploaded video.
    • Optional (but recommended): Add a Send an email (V2) action here to notify the user that their video upload was blocked, along with a quick note about the site's file policy.

Step 4: Test and Validate

  • Upload a test video to confirm the flow triggers, detects the video content type, and deletes the file automatically.
  • Upload a non-video file (like a PDF or Word doc) to make sure legitimate files aren't affected.

Quick Pro Tips

  • Permissions Double-Check: Since you're the site owner, your flow should have full access to delete files, but if you run into errors, verify the flow's connection has the necessary library permissions.
  • Expand to Other File Types: If you want to block audio files too, add an Or clause in the condition to check for audio/ as the MIME type prefix.

内容的提问来源于stack exchange,提问作者Avsrot

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:46:35