Giter VIP home page Giter VIP logo

uploadwidget's Introduction

UploadWidget

Contao 3 Widget for easy uplading files with drag&drop support

Features

  • 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 or save and close button

Planed features

  • upload of multiple files
  • sync with DB-FS
  • cascade deleting of files when the related database-row gets deleted

Installation and Usage

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 ''"
),

Supported eval-parameters

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.

Credits, Licence

uploadwidget's People

Contributors

psi-4ward avatar smilingthax avatar

Stargazers

Nikolas Runde avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

kimilau

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.