Hi Jesper,
The standard File Uploader widget exposes Maximum File Size (MB) as a widget property, but its documentation does not provide a built-in way to bind that property to an attribute and change it dynamically at runtime.
For your requirement, I would consider the following approaches.
Option 1: Extend the File Uploader widget (recommended for a true runtime setting)
If an administrator must change the limit without redeploying the application:
This requires custom widget development and testing; it is not a setting available out of the box.
Option 2: Use separate widget configurations for a small number of predefined limits
If the requirement is limited to a few known limits, you could configure separate uploader widgets with different maximum sizes and control their visibility based on the administrator's setting.
This is simpler, but it is not suitable for arbitrary limits because each widget's size remains statically configured.
Important: Check the platform upload limit
Even if the widget permits a file of 200 MB, the Mendix runtime or hosting platform may impose a lower request-size limit. The widget setting alone cannot override that restriction. Verify the supported limits for your deployment environment before implementing larger uploads.
Official references:
My recommendation: If the limit must be editable at runtime by an administrator, extend the widget to read a dynamic configuration value and validate the file on both the client and server. First confirm that your hosting platform supports the maximum size you intend to allow.
Hope this helps!
Hi Jesper,
Looking at your screenshot, Maximum number of files and Maximum concurrent uploads already accept an expression (that’s the Edit... button), but Maximum file size (MB) is still a fixed number. So it can’t be bound to an attribute directly. There are two ways around it that work well, and you can combine them.
Option 1: Fully dynamic limit (admin can enter any value)
I tested this with the latest version of the File Uploader: files under the limit upload normally, and files over the limit are removed straight away with a warning. Since the limit comes from the database, the admin can change it at any time without redeploying.
The only downside is that the file is uploaded first and rejected afterwards. If you’re on an older version without On upload success, update the widget from the Marketplace, or do the same check in the microflow behind your Save button.
Option 2: Two uploaders with different limits (no wasted upload)
Put two File Uploader widgets on the page, one with a normal limit (for example 25 MB) and one with a large limit (for example 500 MB). Control which one is visible with a boolean such as AllowLargeUploads, which the admin can switch on when needed (or base it on a user role).
Here the widget itself rejects big files before they’re uploaded, but you’re limited to the fixed values you choose.
Combining both: use Option 2 so normal users never upload huge files, and Option 1 on the large uploader so the admin can still set the exact limit.
For 200MB+ files: also check that your hosting setup allows uploads that large, for example any reverse proxy or ingress limits if you’re on-premises or on Private Cloud. Otherwise the upload can fail before it reaches the app.
Since the other two limits already support expressions, it might also be worth posting an idea on the Mendix Ideas forum to make Maximum file size an expression as well.
If this helps, please mark it as the accepted answer.