2017 © Pedro Peláez
 

library easydd

easyDD is a library to get HTML5 powered dropzones the easy way.

image

cookiekiller/easydd

easyDD is a library to get HTML5 powered dropzones the easy way.

  • Thursday, May 17, 2018
  • by cookiekiller
  • Repository
  • 2 Watchers
  • 0 Stars
  • 7 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

EasyDD - Easy Drop Zone

This library provides a easy drop zone without losing control of the data., (*1)

Like to see the demo live? http://msphn.github.io/easydd/, (*2)

Features

  • Drop one ore more files to a dropzone
  • Define maximum filesize
  • Define allowed mime types
  • No ajax just getting data from a dropzone
  • Upload files by clicking at the dropzone

Use it

It's easy, just include src/easydd.js and easydd.css in your HTML., (*3)

Create an empty div and give it an id., (*4)

Initialize is like that:, (*5)

    // Initialize easyDD
    var dd = new easydd({
        // HTML ID of an existing div to render to
        elementId: 'dd',
        // Centered text inside the div?
        text: 'Drop or Click here!',
        // Max file size in kb
        maxSize: 250,
        // Array of allowed mimetypes
        allowedMimeTypes: ['image/png', 'image/jpeg', 'image/gif'],
        // Callback function see callbackTest above
        callback: callbackTest
    });

And to use all these awesome data you receive, add a callback function in the callback parameter., (*6)

If you don't like limits, just remove maxSize and allowedMimeTypes, every file will be passed now to your callback function., (*7)

Installation

npm i easydd, (*8)

Works with

I verified: * Firefox 37+ * Chrome 42+ * Midori 0.5.9 (Apple WebKit) * Internet Explorer 11 (11.0.9600.17728) * Safari 9+, (*9)

Haven't tested with any other browser yet., (*10)

Contributing?

Please support that library by testing and improving., (*11)

The Versions

17/05 2018

dev-foobar

dev-foobar

easyDD is a library to get HTML5 powered dropzones the easy way.

  Sources   Download

AGPL-3.0-or-later

by Michael Falk Spahn

05/04 2018

dev-master

9999999-dev

easyDD is a library to get HTML5 powered dropzones the easy way.

  Sources   Download

AGPLv3 AGPL-3.0-or-later

by Michael Falk Spahn
by Michael Spahn

26/04 2015

v1.2

1.2.0.0

Easy dropzone library to get a dragzone HTML5 powered dropzone for files.

  Sources   Download

AGPLv3

by Michael Falk Spahn

24/04 2015

v1.1

1.1.0.0

Easy dropzone library to get a dragzone HTML5 powered dropzone for files.

  Sources   Download

AGPLv3

by Michael Falk Spahn