How to Validate Uploaded File Size in SharePoint Online Standard Forms
Question details
The user wants to validate or restrict the file size of documents uploaded via out-of-the-box SharePoint Online forms and is exploring workarounds like remote event receivers.
- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Managing document uploads to ensure files do not exceed a specific size limit in standard SharePoint list or library forms.
- Observed behavior
- Standard SharePoint Online forms lack built-in granular file-size validation prior to upload, requiring alternative post-upload workflows to manage oversized files.
Ensure you have the necessary permissions to create and manage Power Automate flows within your SharePoint environment, as standard list forms do not support native file-size validation logic.
Use Power Automate for Post-Upload File Validation
Since native forms cannot block large files during upload, use a Power Automate flow to detect, evaluate, and manage oversized files immediately after creation.
SharePoint Online does not offer granular file-size validation directly inside standard list forms. The most reliable alternative is to validate the file asynchronously after it is uploaded using Microsoft Power Automate.
Remote event receivers are generally not recommended for standard SharePoint Online deployments as they require complex custom development, hosting, and maintenance.
Navigate to Microsoft Power Automate, click 'Create', and select 'Automated cloud flow'.
Search for and select the SharePoint trigger named 'When a file is created (properties only)' and link it to your target site and library.
Add a 'Get file metadata' action using the file identifier from the trigger to retrieve the uploaded file's exact size in bytes.
Add a 'Condition' control to check if the file size exceeds your specified limit (for example, setting the condition to 'greater than 10485760' for a 10MB limit).
In the 'If yes' branch, add actions to notify the user via email or Microsoft Teams that their file was too large, followed by a 'Delete file' or 'Move file' action to remove the non-compliant document.
Implement a File Approval Workflow
Hold uploaded files for automated or manual review before they become visible to the broader team.
Looking for a Simpler Way to Manage Documents? Try WPS Office
If managing complex SharePoint configurations and Power Automate flows feels overwhelming, consider WPS Office. It provides a lightweight, highly compatible alternative to Microsoft Office, complete with seamless cloud collaboration and straightforward file management features that require zero custom development.
- 1. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite on your device.
- 2. Access WPS Cloud: Sign in to your WPS account to instantly access your dedicated WPS Cloud storage space.
- 3. Manage Documents Effortlessly: Upload, share, and collaborate on your documents directly from the intuitive dashboard without needing complex backend workflows.

Frequently Asked Questions
Can I restrict file upload size directly in SharePoint Online standard forms using column validation?
No, standard SharePoint Online list forms do not support granular file-size validation or column validation rules for attachments or uploaded files.
Are remote event receivers a good solution for SharePoint Online file validation?
Generally, no. Remote event receivers require extensive custom development, hosting, and ongoing maintenance. They are less suitable for modern SharePoint Online environments compared to using Power Automate.
Does Power Automate prevent the user from uploading a large file?
No, Power Automate triggers asynchronously. This means the large file will be uploaded to SharePoint first, and the flow will process, notify, or delete it shortly after the upload completes.
How do I convert file size from bytes to megabytes in Power Automate?
You can use a 'Compose' action with an expression like `div(outputs('Get_file_metadata')?['Size'], 1048576)` to convert the raw byte size into megabytes for easier condition checking.




