Ask user where to save file with Node.js

后端 未结 1 1739
春和景丽
春和景丽 2020-12-16 00:19

I\'m creating an app using node-webkit, so there\'s a lot of javascript. I have written a node.js function that will take a screen shot and save it to the disk, however, it

1条回答
  •  佛祖请我去吃肉
    2020-12-16 00:30

    The File Dialog page in the Wiki mentions a save dialog file input

    nwsaveas will open a save as dialog which let user enter the path of a file, and it's possible to select a non-exist file which is different with the default file input tag:

    You could use that in an custom dialog like a modal or so to query the user for that input.

    Very basic example based on your provided code:

    
    
    Screen shot
    
    
    

    0 讨论(0)
提交回复
热议问题