Feature Request: Clipboard File Access

56 views
Skip to first unread message

rahulg...@gmail.com

unread,
Jul 22, 2015, 10:26:43 PM7/22/15
to nw.js
Hi Roger and the NWJS team,

I would like to request the possibility of having clipboard that can handle files.

My use case is as follows:
Consider a file browser app (like the example app for nwjs). I would like to be able to select files and copy them here and then be able to go file explorer/finder and paste it there and vice versa. This would require that if one is selecting an object that is a file, nwjs can put the requisite pointer on the clipboard which the OS can interpret.

Please let me know if there is any possibility that you may consider this feature. (Or you have some alternative that you can tell me about). I desperately need this for my app!

Thanks in advance,
Rahul

lza...@gmail.com

unread,
Jul 22, 2015, 10:59:47 PM7/22/15
to rahulg...@gmail.com, nw.js
Hi,
I have used this module before with good success cross platform https://github.com/xavi-/node-copy-paste

Hope it helps. 

Laszlo

--
You received this message because you are subscribed to the Google Groups "nw.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nwjs-general...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rahul Gupta

unread,
Jul 23, 2015, 10:43:00 AM7/23/15
to lza...@gmail.com, nw.js
Hi Laszlo,

Thanks for your suggestion. I am unable to figure out how I can copy/paste a file using its reference. Using a stream would mean that I would need to load the file to memory to copy it which becomes untenable for large files. 

I thought clipboard access should ideally be handled from the v8 side but in principle you suggestion should work (I'll play with it and see).

Am I missing something here?

Thanks again,
Rahul

lza...@gmail.com

unread,
Jul 23, 2015, 11:26:40 AM7/23/15
to Rahul Gupta, nw.js
Hi,


On Jul 23, 2015, at 08:42, Rahul Gupta <rahulg...@gmail.com> wrote:

Hi Laszlo,

Thanks for your suggestion. I am unable to figure out how I can copy/paste a file using its reference. Using a stream would mean that I would need to load the file to memory to copy it which becomes untenable for large files. 

I thought clipboard access should ideally be handled from the v8 side but in principle you suggestion should work (I'll play with it and see).

Am I missing something here?

Thanks again,
Rahul

I am on the road today and tomorrow so I can't help with an example. 
Play with the examples on the github page. Basically by using the OS clipboard it handles the reference and you don't have to load files into memory. If I remember good it's been awhile since I used it. 
Let me know if you need more help with it. 


Laszlo
Reply all
Reply to author
Forward
0 new messages