Distinguish drag and drop types

Hi,

In filemanager is there a way to distinguish between a file being dragged in from the filesystem and just an internal drag in webix between folders?

Also, is there a way to drag a file out to the filesystem (i.e. download via drag?)

Inner DnD relies on basic Webix events (section “Drag-and-Drop Context and Events”).
You can check the implementation of these event handlers.

The uploading in FileManager supports other events:

  • onBefore/onAfterFileUpload (for any kind of uploading).
  • filemanager.getUploader() gives access to the Uploader API which has the onBefore/onAfterFileDrop methods

You can use the debug version of the library to log all events during any action in Webix components.

As for the downloading via DnD, there’s no ready-to use solution so far.
Webix DragControl is limited by document, but you can use one of the basic events to get the needed data for the DataTransfer API. The most known example you can check here.