-
Hi, I am making an file manager and now I want to drag a video file from my app to Potplayer (or any other players). Is it possible? I only find the solution about dragging files from other apps to tauri-app, not the other way around. |
Beta Was this translation helpful? Give feedback.
Answered by
lomirus
Feb 12, 2024
Replies: 1 comment 4 replies
-
Just found the solution. Seems I can simply write the path into <div id="drag_source" draggable="true">Drag Me</div> const dragSource = document.querySelector('#drag_source')
dragSource.addEventListener("dragstart", function (event) {
event.dataTransfer.setData("text", 'D:\\Videos\\abc.mp4');
}); |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
lomirus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just found the solution. Seems I can simply write the path into
dataTransfer
: