Constructors

Properties

element: HTMLElement

The 'dropzone' element.

Memberof

FileDrop

Member

fileDroppedCallbackBinary: IDroppedCallbackBinary

The binary file drop callback.

Memberof

FileDrop

Member

fileDroppedCallbackJSON: IDroppedCallbackJSON

The JSON file drop callback.

Memberof

FileDrop

Member

fileDroppedCallbackSVG: IDroppedCallbackSVG

The SVG file drop callback.

Memberof

FileDrop

Member

fileDroppedCallbackText: IDroppedCallbackText

The text file drop callback.

Memberof

FileDrop

Member

Methods

  • Install the JSON (MIME type json*) file drop callback. Note than only one callback can be installed in this implementation. Calling this method multiple times will overwrite previously installed listeners.

    The callback will receive the dropped file content as an object (parsed JSON).

    Parameters

    • callback: IDroppedCallbackJSON

    Returns void

  • Install the text file (MIME type text/plain) drop callback. Note than only one callback can be installed in this implementation. Calling this method multiple times will overwrite previously installed listeners.

    The callback will receive the dropped file content as a string.

    Parameters

    • callback: IDroppedCallbackText

    Returns void