How to Realize Drag and Drop Folder Upload for WEB Pages

  node.js, question

I want to realize such a thing, similar to the effect inside the cloud disk, dragging a local directory to the page.
But instead of uploading the files in the folder, you just need to get the local path of the folder. What technology or control is used to implement it?

clipboard.png

Or directly browse through HTML to select the physical path of the folder

clipboard.png

Dropzone.js

http://www.dropzonejs.com/

LookelectronDocument for

dialog.showOpenDialog([browserWindow, ]options[, callback])

  • browserWindowBrowserWindow (optional)

  • optionsObject

    • titleString

    • defaultPathString

    • filtersArray

    • propertiesArray – Contains which features the dialog should use, can containopenFile,openDirectory,multiSelectionsandcreateDirectory

  • callbackFunction (optional)

https://github.com/electron/electron/blob/b2a3aabc904faa22899d07f566e4c37719adda65/docs/api/dialog.md