Contao 3 Widget for easy uplading files with drag&drop support
- Independent Widget, no need to use the fileTree or the database driven filesystem.
- Upload via drag&drop if the browser supports
- Use the ID of the current element in the path
- Images displayed as thumbnails
- Uploaded file gets stored not before the user presses the
save
orsave and close
button
Planed features
- upload of multiple files
- sync with DB-FS
- cascade deleting of files when the related database-row gets deleted
Just copy all files in system/modules/UploadWidget
DCA-Field example
'myImage' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_table']['myImage'],
'exclude' => true,
'inputType' => 'UploadWidget',
'eval' => array
(
'path' => 'files/customImages/{{id}}/myImage',
'extensions' => 'png,jpg,gif',
'overwrite' => false,
'mandatory' => true
),
'sql' => "varchar(255) NOT NULL default ''"
),
path | The path to store the files. Use {{id}} to reference the ID of the current record. |
---|---|
extensions | Comma sperated list of valid file-extensions |
overwrite | boolean, default: false. Set to true to overwrite existing files with the same name |
md5AsFilename | boolean, default: false. Set to true to rename the file to its md5 hash |
exactSize | array(intWidth, intHeight). Validates the image for the exact size. |
- Uses Valums Fineuploader.
- Licence: LGPL
- by 4ward.media