5.16.2
If you want the contents of any drop zone to be invisible until an item enters the drop zone,
simply ensure a qq-hide-dropzone
attribute is present on the drop zone container.
Fine Uploader's UI mode has drag & drop support built in. The following contains information about the standalone support. Here, you can find instructions that will allow you to easily integrate Fine Uploader's standalone drag & drop module into your project if you are using Fine Uploader's core mode only. For more information about the integrated support, see the options and methods in the side nav bar of this page.
If using the integrated drag & drop feature of Fine Uploader UI, a qqDropTarget
property is added to all File
objects dropped into any drop zone. The value of this property points to the actual drop zone element.
If you are integrating Fine Uploader and utilizing core mode, you are likely building you own UI entirely. In case you want to support drag and drop of folders and files, you probably don't want to re-invent the wheel, since Fine Uploader already has code to handle this in Fine Uploader mode. Fine Uploader's drag & drop code has been moved into a standalone module, so it can be easily integrated into your Fine Uploader Core mode app (or even any non-Fine Uploader app). This following will explain how to utilize this module.
This module is aimed at Fine Uploader Core mode integrators only. If
you are running this in UI mode, then take a look at the dragAndDrop
Fine Uploader UI option.
Set to false
if you want to prevent the user from dropping more than one item at once.
Specify all container elements that should be treated as drop zones.
Specify a CSS class to apply to drop zone(s) when a file has entered it.
Invoked when the module has started processing the set of dropped files.
Invoked when the module has finished processing.
An array of processed files. Note that a qqPath
property will be added
to each File
object that was dropped as part of a directory drop. The value of this property
will be the path of the file starting with the dropped top-level directory.
The target where this event originated from.
Called when processing the drop fails for any reason.
The specific error code
Data related to the error.
Invoked when a message is logged.
The message to log.
Invoked when dragged element enters drop zone.
Invoked when dragged element leaves drop zone.
Tears down all drop zones associated with the dnd instance.
Call this to add an additional drop zone to the DnD instance. Not available if using the jQuery plug-in wrapper.
THe HTMLElement where the dropzone will be rendered inside of.
Call this to remove a drop zone from the DnD instance. Not available if using the jQuery plug-in wrapper.
THe HTMLElement where the dropzone will be remove from.
var dragAndDropModule = new qq.DragAndDrop({ dropZoneElements: [document.getElementById('myDropZone')], classes: { dropActive: "cssClassToAddToDropZoneOnEnter" }, callbacks: { processingDroppedFiles: function() { //TODO: display some sort of a "processing" or spinner graphic }, processingDroppedFilesComplete: function(files, dropTarget) { //TODO: hide spinner/processing graphic fineUploaderBasicInstance.addFiles(files); //this submits the dropped files to Fine Uploader } } }), fineUploaderBasicInstance = new qq.FineUploaderBasic({ request: { endpoint: "server/uploadHandler" } });