/* Provides visible feedback when use drags a file over the drop zone: */ .fd-zone.over { border-color: maroon; }
<!-- A FileDrop area. Can contain any text or elements, or be empty. Can be of any HTML tag too, not necessary fieldset. -->
// Tell FileDrop we can deal with iframe. uploads using this URL: var ptions = {iframe. {url: 'your-upload-script.php'}}; // Attach FileDrop to an area: var zone = new FileDrop('zone', options);
// Do something when a user chooses or drops a file: zone.on.send.push(function (files) { // if browser supports files[] will contain multiple items. for (var i = 0; i < files.length; i++) { files[i].SendTo('your-upload-script.php'); } });