Webform File Size Total
No security coverage
Drupal 10–11
Part of the Webform ecosystem · 157 projects
Adds an Attachment size total element to the webform element library. Place it anywhere on a webform to show the customer a live running total of the size of every file they have attached, and warn or block them once a size threshold is reached.
Built for Drupal 11.3, Webform 6.3, PHP 8.3. Requires Drupal 10.3+ / 11 and the Webform module.
What it does
- Counts every File upload element on the page, including uploads nested inside composite elements and multiple-value elements (5 or 50 of them, it does not matter - a single element can hold many files and every instance is counted).
- Counts media references as a best effort too (media library and media entity reference elements), resolving each media item back to its source file.
- Updates the moment a file is chosen - before the AJAX upload has even finished - and again when a file is removed or a composite row is added.
- Counts either just this page or the whole submission, per element - a multi-page (wizard) form can show a total that includes the files attached on earlier pages.
- Is positionable: the designer drags it wherever they want on the *Build* tab, like any other element.
- Fires thresholds at configurable sizes, each of which can show a message, add a CSS class, dispatch a JavaScript event, and optionally block submission.
- Stores the total (in bytes) on the submission, so it shows in submission views, exports and reports.
Depends on
Dependencies of the latest stable release
- Webform
- file Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Webform ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 10–11 | A positionable webform element showing a live running total of the size of every file attached to the submission, with configurable thresholds that can warn the customer or block submission. Counts composites, multi-value fields and media. | Sep 19, 2026 |