久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

是否可以將遠程文件從 Electron App 拖到文件系統上

Is it possible to drag a remote file out of Electron App onto the file system?(是否可以將遠程文件從 Electron App 拖到文件系統上?)
本文介紹了是否可以將遠程文件從 Electron App 拖到文件系統上?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我一直在嘗試使用 Electron 應用程序的文件系統拖放功能,并且沒有遇到任何問題,可以讓所有內容都與本地文件一起使用.我在文檔中沒有遇到任何內容,所以我想看看是否有人知道這是否可能.我想使用 Electron 中的拖出功能將遠程文件拖出應用程序并拖到文件系統上.

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 come across anything in the documentation, so I'd like to see if anyone knows if this is possible. I'd like to use the drag-out feature in Electron to drag a remote file outside of the app and onto the file system.

具體例子:我正在開發的程序是一個遠程文件管理工具——類似于 Dropbox.我想將代表遠程文件的 dom 元素拖到 Finder(或 Windows 資源管理器)窗口,并讓 Electron 將文件下載到該位置.

Specific example: The program I am working on is a remote file management tool - similar to dropbox. I'd like to drag the dom element representing the remote file to a Finder (or Windows Explorer) window and have Electron download the file to that location.

只要文件按照 Electron 文檔存儲在本地,我就可以讓它工作.http://electron.atom.io/docs/全部/#dragging-files-out-of-the-window

I am able to get this to work as long as the file is stored locally following the Electron documentation. http://electron.atom.io/docs/all/#dragging-files-out-of-the-window

我可以設想兩種可能的解決方案:

I can envision two possible solutions:

  • electron 是否能夠將 DownloadItem 或 URL 傳遞給startDrag"事件(如上面鏈接中所引用的)?
  • 是否有可能監聽某種丟棄"并獲取我的 dom 元素被丟棄的本地文件系統路徑?例如,/Users/{proile}/Desktop?我可以使用我現有的下載方法將文件下載到該特定路徑.

關于如何實現我的目標有什么想法嗎?非常感謝您的寶貴時間.

Any thoughts on how I can accomplish my goal? Thanks so much for your time.

推薦答案

我還沒有看到任何此類功能的示例——但看起來并不難拼湊起來(著名的遺言...)

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. 您在遠程文件的 UI 中擁有您的表示,并且可以將這些表示拖動"到桌面.
  2. 當用戶拖動其中一種表示時,您會捕捉到目標目的地
  3. 您開始下載相關文件并將其保存到目標位置

至少我會這樣開始處理它.有各種與電子相關的庫處理下載(例如 electron-dl).如果你得到這個工作,報告回來并分享詳細信息.

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.

這篇關于是否可以將遠程文件從 Electron App 拖到文件系統上?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to fix BrowserWindow is not a constructor error when creating child window in Electron renderer process(在 Electron 渲染器進程中創建子窗口時如何修復 BrowserWindow 不是構造函數錯誤) - IT屋-程序員軟件開發技術
mainWindow.loadURL(quot;https://localhost:3000/quot;) show white screen on Electron app(mainWindow.loadURL(https://localhost:3000/) 在 Electron 應用程序上顯示白屏)
Electron webContents executeJavaScript : Cannot execute script on second on loadURL(Electron webContents executeJavaScript:無法在第二個 loadURL 上執行腳本)
how to use electron browser window inside components in angular-cli?(如何在angular-cli的組件內使用電子瀏覽器窗口?)
ElectronJS - sharing redux store between windows?(ElectronJS - 在 Windows 之間共享 redux 存儲?)
How to access camera/webcamera inside electron app?(如何在電子應用程序中訪問相機/網絡攝像頭?)
主站蜘蛛池模板: 黄色在线免费网站 | 久久机热| 成人精品国产免费网站 | 亚洲精品在线播放 | 久久久精品一区二区三区 | 亚洲精品国产精品国自产在线 | 91亚洲精品在线 | av黄色在线观看 | 激情网站在线观看 | 亚洲一级在线 | 一级免费毛片 | 97精品一区二区 | 欧美色视频免费 | 中文字幕欧美一区二区 | 国产午夜久久久 | 亚洲网址在线观看 | 久久国产一区二区三区 | 毛片网在线观看 | 九九亚洲 | 日韩欧美理论片 | 国产精品久久a | 夜久久 | 亚洲 欧美 日韩 在线 | 欧洲精品码一区二区三区免费看 | 久久精品国产久精国产 | 亚洲精品一区二区三区中文字幕 | 国产一区二区三区网站 | 久久久精品日本 | 久久精品一区 | 成人免费在线视频 | 成人亚洲性情网站www在线观看 | 国色天香成人网 | 99精品视频在线观看免费播放 | 中文字幕 在线观看 | 欧美一区二区三区一在线观看 | 91视频导航| 日韩精品一区二区三区中文字幕 | 艹逼网| 日韩精品一区二区三区中文在线 | 日韩综合在线播放 | 亚洲精品二区 |