久久久久久久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?(如何在電子應用程序中訪問相機/網絡攝像頭?)
主站蜘蛛池模板: 日韩伦理一区二区 | www日韩高清 | 欧美精品一区二区三区四区 | 中文字幕视频在线 | 91在线看网站 | 日韩一区在线播放 | 欧美日韩在线一区 | 午夜a√| 日韩高清中文字幕 | 1级毛片| 九九综合 | 精品国产一区二区三区久久 | 久久久久久久国产 | 日产精品久久久一区二区福利 | 久久精品综合 | 亚洲综合色站 | 亚洲一区视频在线 | 九九久久在线看 | 日韩高清一区二区 | 精品在线一区二区三区 | 国产成人精品免费视频大全最热 | 成人性生交大片免费看中文带字幕 | 一区二区三区国产精品 | 综合久久99| 性色av香蕉一区二区 | 日本一区视频在线观看 | 一区二区三区精品视频 | 日本成人区 | 91高清免费| 亚洲成人毛片 | 黄色免费av | 久久国内 | 精品国产区 | 精品一区二区三区中文字幕 | 日韩免费看片 | 青青草av网站 | 性一区| 欧美一区二区三区免费在线观看 | 欧美精品一区二区三区四区 在线 | 中文字幕一区二区三区不卡 | 欧美专区在线 |