Drag and Drop Support

14 Aug 20181 minute to read

The file explorer allows the files to move from one folder to another by using drag and drop. It also supports uploading a file by dragging it from Windows Explorer to a folder in the file explorer control.

You can enable or disable this support by using the “AllowDragAndDrop” API of FileExplorer.

The dragStart, drag, dragStop and drop events occur in the mentioned order when a drag and drop operation is performed.

In the view page, add “FileExplorer” helper and specify the drag and drop option as specified in the following:

  • <ej-file-explorer id="file" path="wwwroot/images/FileExplorer" ajax-action="@Url.Content("FileActionDefault")" allow-drag-and-drop="false">
            <e-download url="/FileExplorer/Download{0}"></e-download>
            <e-get-image url="/FileExplorer/GetImage{0}"></e-get-image>
            <e-upload url="/FileExplorer/Upload{0}"></e-upload>