electron-react-boilerplate) How to create file download system using drag and drop - reactjs

I'm creating file converter using electron-react-boilerplate. Although importing files was implemented with drag and drop, did not implement downloading files by drag and drop like when dragging a Google image search result.
https://www.electronjs.org/docs/latest/tutorial/native-file-drag-drop
I tried the above method, but it didn't work in electron-react-boilerplate environment.
Is there a way to get files in a specific path by drag and drop in the app?

Related

Drag and Drop, source is from app or file explorer?

I have a winform app which allows drag and drop. In the app is a fileListView which is a mock up of a file explorer.
I can currently drag a file from the fileListView or the file explorer.
How can I tell if the drag source is from the fileListView or from the file explorer?
I was using the e.Data.GetData(DataFormats.FileDrop) and seeing if the substring started with '\'. However, I've since learned that this isn't good enough because sometimes the file explorer can drag files directories starting with '\' also.
note: all the files on the fileListView start with '\'

Drag and drop in silkTest

I tried to do a functional test that consists of drag and drop but I didn't found a way in silk4j. is there a way to do it or
silk4j doesn't support drag and drop tests?
I am using Silk4J Browser replay and have several tests that do drag and drop.
You basically locate the object (DomElement, DomLink,..) that should be moved, invoke the pressMouse() method on it, find the target object and invoke the mouseMove() and then the releaseMouse() method on it. This should do the drag and drop.
So you just have to manually "simulate" the drag and drop.

Gong drag and drop - Touch

I'm using the Gong - Drag and drop solution, which works like a charm on my Windows 7 Machine, but as soon as I transfer the solution to my Surface tablet, and starts to drag and drop, nothing happens when I use my fingers, but when I use my stylus it works.
How do I easily implement the drag and drop with fingers instead, or am I doing something wrong when dragging and dropping.
I have created a sample project with facilities like:
Drag a node and Drop it in another node
Add a node using Context Menu
Rename a node using Context Menu
Delete a node using Context Menu
You can find sample project here.
I have not tried to solve your problem but you can easily add event handlers for touch and make some changes to that sample to do your work.
You can get complete control over the code as I have not used any external libraries in this project.

Retrieving Icon/image of a file/folder (CentOS)

Can anybody suggest me how to retrieve icon or image of a folder that is created newly?
Please note that I am using GTK & C on CentOS, where I have a situation like this:
programmatically I create folder using mkdir() system call. When a new folder is created, I need to find the icon that is created for this folder from GUI perspective and I don't know where the image/icon is loaded from.
For example, we generally use GdkPixbuf functions to display/overlay icon. So my problem is, when a new file/folder is created, how would I get the icon that is created for them (who will create those icons) so that I can make use of icon's path and do an overlay on it using GdkPixbuf?
If more details needed, please revert back.
Thanks.

Can we drop a file in windows explorer from WPF window?

I have a treeview that shows the current file system. I want to add functionality to enable dropping files into windows explorer. If I drag any of the node of my treeview and drop it on any of the window of Windows explorer then the file will be copied to that location. How can I accomplish this?
First read this about how to implement drag and drop in WPF.
The read this for some information about what explorer expects when you drop in it.
Then ask new questions if you still have any.

Resources