Dynamic Business Central 365: AllowedFileExtensions Property
When building file upload functionality in Microsoft Dynamics 365 Business Central, controlling what kind of files users are allowed to upload is a critical requirement. This is where the AllowedFileExtensions property becomes extremely useful.
Introduced with runtime version 13.0, the AllowedFileExtensions property allows developers to explicitly restrict the file types that users can upload through a Page File Upload Action. This helps enforce data integrity, improve security, and provide a better user experience.
What Is the AllowedFileExtensions Property?
The AllowedFileExtensions property specifies a comma-separated list of file extensions that a user is permitted to upload or drag into a file upload drop zone.
If a user attempts to upload a file with an extension not included in this list, Business Central will automatically block the action.
This property is only applicable when using file upload actions on pages.
Syntax
AllowedFileExtensions = '.jpg','.jpeg','.png';
Practical Example
Suppose you are building a page where users are allowed to upload image files only (for example, item images, inspection photos, or profile pictures).
Each file extension:
-
Must start with a dot (
.) -
Must be enclosed in single quotes
-
Must be separated by commas
Important Notes and Limitations
-
The validation is based only on file extension, not on file content.
-
This property does not replace server-side validation if your solution requires deeper file inspection.
-
It is available only from runtime version 13.0 onward.
-
The property does not apply to older upload patterns that do not use Page File Upload Actions.
This was originally posted here.

Like
Report
*This post is locked for comments