Is it possible to drag a remote file out of Electron App onto the file system?

后端 未结 1 1573
清酒与你
清酒与你 2021-02-10 10:17

I have been playing around with the file system drag and drop functionality of Electron apps and haven\'t had any issues getting everything to work with local files. I have not

相关标签:
1条回答
  • 2021-02-10 11:18

    I haven't seen any examples of this sort of functionality – but it doesn't seem like it would be hard to cobble it together (famous last words...)

    1. You have your representations in the UI of the remote files and those are enabled to be "dragged" to the desktop.
    2. You catch the target destination when the user drags one of those representations
    3. You start a download of the associated file and save it to the target destination

    At least that is how I would start to approach it. There are various electron related libs dealing with downloads (e.g. electron-dl). If you get this working, report back and share the details.

    0 讨论(0)
提交回复
热议问题