PHPackages                             heimrichhannot/contao-multifileupload-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. heimrichhannot/contao-multifileupload-bundle

ActiveContao-bundle[Utility &amp; Helpers](/categories/utility)

heimrichhannot/contao-multifileupload-bundle
============================================

Contao front end widget that provides dropzonejs.com functionality.

1.10.0(4mo ago)17.0k[1 issues](https://github.com/heimrichhannot/contao-multifileupload-bundle/issues)[1 PRs](https://github.com/heimrichhannot/contao-multifileupload-bundle/pulls)LGPL-3.0-or-laterPHPPHP ^7.4 || ^8.0CI failing

Since Apr 3Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/heimrichhannot/contao-multifileupload-bundle)[ Packagist](https://packagist.org/packages/heimrichhannot/contao-multifileupload-bundle)[ Docs](https://github.com/heimrichhannot/contao-multifileupload-bundle)[ RSS](/packages/heimrichhannot-contao-multifileupload-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (57)Used By (0)

[![](https://camo.githubusercontent.com/b73f54b62d2f74decdc8bf715b9edf5ba7442d9af39df0931222fc38717a22a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6865696d7269636868616e6e6f742f636f6e74616f2d6d756c746966696c6575706c6f61642d62756e646c652e737667)](https://packagist.org/packages/heimrichhannot/contao-multifileupload-bundle)[![](https://camo.githubusercontent.com/164ebe7dbddb62f0464875067e8b6ccb8a291ccdb98e7dc59fa9ba07247c8f1c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6865696d7269636868616e6e6f742f636f6e74616f2d6d756c746966696c6575706c6f61642d62756e646c652e737667)](https://packagist.org/packages/heimrichhannot/contao-multifileupload-bundle)[![](https://camo.githubusercontent.com/2708e006d23cf6e140a7915a1b03f34c3fac15220d012066284b8b25153a8607/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6865696d7269636868616e6e6f742f636f6e74616f2d6d756c746966696c6575706c6f61642d62756e646c652e737667)](https://packagist.org/packages/heimrichhannot/contao-multifileupload-bundle)

Contao Multi File Upload Bundle
===============================

[](#contao-multi-file-upload-bundle)

Contao front end widget that provides [dropzonejs.com](http://www.dropzonejs.com/) functionality to both back and front end.

[![alt text](/doc/multifileupload-demo.jpg "Multifileupload demo within contao backend")](/doc/multifileupload-demo.jpg)

Features
--------

[](#features)

- javascript written in native javascript
- support for jquery ajaxComplete and mootools ajax\_change events
- support for Contao Form Generator
- support for [Encore Bundle](https://github.com/heimrichhannot/contao-encore-bundle)
- support for [Formhybrid Compatibility Bundle Bundle](https://github.com/heimrichhannot/contao-formhybrid-compatibility-bundle) formhybrid\_ajax\_complete event

Usage
-----

[](#usage)

### Install

[](#install)

1. Install heimrichhannot/contao-multifileupload-bundle via composer or contao manager

    ```
    composer require heimrichhannot/contao-multifileupload-bundle

    ```
2. Update your database

### Form Generator

[](#form-generator)

Create your form and use the `File-Upload (Multi File Upload)` field type.

[![Screenshot of the multi column editor field type in the contao form generator backend.](doc/img/screenshot_backend_formgenerator.png)](doc/img/screenshot_backend_formgenerator.png)

### DCA

[](#dca)

Create a widget of inputType `multifileupload`. It is usable in the contao backend or in the contao frontend in combination with [Formhybrid](https://github.com/heimrichhannot/contao-formhybrid).

```
$GLOBALS['TL_DCA']['tl_example']['fields']['example_upload'] = [
    'inputType' => 'multifileupload',
    'eval'      => [
        'extensions'     => string, # A comma-seperated list of allowed file types (e.g. "jpg,png"). Default: 'Config::get('uploadTypes')'
        'fieldType'      => 'radio'|'checkbox', # Use radio for single file upload, checkbox for multi file upload
        'uploadFolder'   => array|string|callable, # Set the folder where uploaded files are stored after submission. Can be a static string (e.g. 'files/upload') or a callback function.
        'maxFiles'       => int, # Maximum number of files that can be uploaded. Works only if multi file upload is allowed (see fieldType). Default: 10
        'maxUploadSize'  => int|string, # Maximum upload size in byte, KiB ("100K"), MiB ("4M") or GiB ("1G"). Default: minimum from Config::get('maxFileSize') and ini_get('upload_max_filesize')
        'minImageWidth'  => int, # Minimum image width in pixel. Default: 0
        'minImageHeight' => int, # Minimum image height in pixel. Default: 0
        'maxImageWidth'  => int, # Maximum image width in pixel. Default: Config::get('imageWidth')
        'maxImageHeight' => int, # Maximum image height in pixel. Default: Config::get('imageHeight')
        'labels'         => [ # Optional. Custom text that will be placed in the dropzone field. Typically a reference to the global language array.
            'head' => string,
            'body' => string ,
        ],
        'skipDeleteAfterSubmit' => boolean, # Prevent file removal from filesystem. Default false
    ],
    'uploadPathCallback' => [[MyUploadCallback::class, 'onUploadPathCallback']],
    'validateUploadCallback' => [[MyUploadCallback::class, 'onValidateUploadCallback']],
    'sql'       => "blob NULL",
];
```

Example for simple single image file upload:

```
$GLOBALS['TL_DCA']['tl_example']['fields']['example_upload'] = [
    'inputType' => 'multifileupload',
    'eval'      => [
        'tl_class'      => 'clr',
        'extensions'    => Config::get('validImageTypes'),
        'fieldType'     => 'radio',
        'uploadFolder'        => 'files/uploads'
    ],
    'sql'       => "blob NULL",
];
```

Example for simple multiple image file upload:

```
$GLOBALS['TL_DCA']['tl_example']['fields']['example_upload'] = [
    'inputType' => 'multifileupload',
    'eval'      => [
        'tl_class'       => 'clr',
        'extensions'     => Config::get('validImageTypes'),
        'fieldType'      => 'checkbox',
        'uploadFolder'   => 'files/uploads'
    ],
    'sql'       => "blob NULL",
];
```

Example for multi image upload with additional config (maximum 5 files with custom image size):

```
$GLOBALS['TL_DCA']['tl_example']['fields']['example_upload'] = [
    'inputType' => 'multifileupload',
    'eval'      => [
        'tl_class'       => 'clr',
        'extensions'     => Config::get('validImageTypes'),
        'fieldType'      => 'checkbox',
        'maxFiles'       => 5,
        'minImageWidth'  => 600,
        'minImageHeight' => 300,
        'maxImageWidth'  => 1600,
        'maxImageHeight' => 1200,
        'uploadFolder'   => 'files/uploads'
    ],
    'sql'       => "blob NULL",
];
```

Documentation
-------------

[](#documentation)

### Supported dropzone config options

[](#supported-dropzone-config-options)

The bundles support most dropzone config options. Just pass them as eval attribute. See [Dropzone Documentation](https://docs.dropzone.dev/configuration/basics/configuration-options) for more information. Some additional node:

- `addRemoveLinks` (boolean, default true): If true, this will add a link to every file preview to remove or cancel (if already uploading) the file.
- `maxFilesize`: Is set by `maxUploadSize` eval property

### Flow chart

[](#flow-chart)

A flowchart with description of the full upload procedure with callback injection can be found here: [Flowchart](http://htmlpreview.github.io/?https://github.com/heimrichhannot/contao-multifileupload-bundle/blob/master/doc/upload-flow-chart.html).

### Additional eval properties

[](#additional-eval-properties)

Additional properties can be set in your fields eval section.

NameDefaultDescriptionminImageWidthErrorText$GLOBALS\['TL\_LANG'\]\['ERR'\]\['minWidth'\]Custom error message for minimum image width. (arguments provided: 1 - minimum width from config, 2 - current image width)minImageHeightErrorText$GLOBALS\['TL\_LANG'\]\['ERR'\]\['minHeight'\]Custom error message for minimum image height. (arguments provided: 1 - minimum height from config, 2 - current image height)maxImageWidthErrorText$GLOBALS\['TL\_LANG'\]\['ERR'\]\['maxWidth'\]Custom error message for maximum image width. (arguments provided: 1 - maximum width from config, 2 - current image width)maxImageHeightErrorText$GLOBALS\['TL\_LANG'\]\['ERR'\]\['maxHeight'\]Custom error message for maximum image height. (arguments provided: 1 - maximum height from config, 2 - current image height)createImageThumbnailsboolean(true)Set to false if you dont want to preview thumbnails.mimeFoldersystem/modules/multifileupload/assets/img/mimetypes/Numix-uTouchThe relative path from contao root to custom mimetype folder, mimetypes.json and images must lie inside. (example: system/modules/multifileupload/assets/img/mimetypes/Numix-uTouch)mimeThumbnailsOnlyboolean(false)Set to true if you want to show mime image thumbnails only, and no image preview at all. (performance improvement)thumbnailWidth90The thumbnail width (in px) of the uploaded file preview within the dropzone preview container.thumbnailHeight90The thumbnail height (in px) of the uploaded file preview within the dropzone preview container.hideLabelfalseHide widget label (Frontend)mimeTypes`null`A comma separated list of allowed mime types (e.g. `'application/x-compressed,application/x-zip-compressed,application/zip,multipart/x-zip'`). Set to empty string `''` if you don't want to restrict mime types. Set to `null` if you just want to restrict mime types if they differ while automatic detection.timeoutnullDropzone Request timeout in milliseconds. See [Documentation](https://docs.dropzone.dev/configuration/basics/configuration-options)### Field Callbacks

[](#field-callbacks)

TypeArgumentsExpected return valueDescriptionuploadPathCallback$strTarget, \\File $objFile, \\DataContainer $dc$strTargetManipulate the upload path after form submission (run within onsubmit\_callback).validateUploadCallback\\File $objFile, \\Widget $objWidgetboolean(false) or string with frontend error messageValidate the uploaded file and add an error message if file does not pass validation, otherwise boolean(false) is expected.Developers
----------

[](#developers)

### PHP Events

[](#php-events)

Events dispatched by symfony event dispatcher.

EventDescriptionPostUploadEventAllows working with the files after upload to upload destination.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance60

Regular maintenance activity

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~54 days

Recently: every ~176 days

Total

53

Last Release

125d ago

PHP version history (3 changes)1.0.0PHP ^7.1

1.4.0PHP ^7.1||^8.0

1.6.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/28ad3224d8727b622ebd229840eea6b9dbcb83eb0bd609e6ce65b614830ff538?d=identicon)[digitales@heimrich-hannot.de](/maintainers/digitales@heimrich-hannot.de)

---

Top Contributors

[![koertho](https://avatars.githubusercontent.com/u/12064642?v=4)](https://github.com/koertho "koertho (54 commits)")[![vvohh](https://avatars.githubusercontent.com/u/75325799?v=4)](https://github.com/vvohh "vvohh (3 commits)")[![ericges](https://avatars.githubusercontent.com/u/25957923?v=4)](https://github.com/ericges "ericges (2 commits)")[![rabauss](https://avatars.githubusercontent.com/u/14016098?v=4)](https://github.com/rabauss "rabauss (2 commits)")[![davidsky7](https://avatars.githubusercontent.com/u/89909249?v=4)](https://github.com/davidsky7 "davidsky7 (1 commits)")[![K0NZ1](https://avatars.githubusercontent.com/u/16319351?v=4)](https://github.com/K0NZ1 "K0NZ1 (1 commits)")

---

Tags

contaoupload

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/heimrichhannot-contao-multifileupload-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/heimrichhannot-contao-multifileupload-bundle/health.svg)](https://phpackages.com/packages/heimrichhannot-contao-multifileupload-bundle)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[codefog/contao-news_categories

News Categories bundle for Contao Open Source CMS

3183.3k6](/packages/codefog-contao-news-categories)[terminal42/contao-node

Node bundle for Contao Open Source CMS

3172.5k4](/packages/terminal42-contao-node)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[numero2/contao-storelocator

Contao Plugin for managing stores (or in common address data) and providing a frontend-search based on geo data

121.5k](/packages/numero2-contao-storelocator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
