Socket
Socket
Sign inDemoInstall

node-file-dialog

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-file-dialog

Shows a gui dialog box to choose files/folders on server side


Version published
Weekly downloads
109
decreased by-73.8%
Maintainers
1
Install size
34.1 MB
Created
Weekly downloads
 

Readme

Source

node-file-dialog

Opens file dialog gui in nodejs server side

Compatibilty

Currently supports 64 bit architecture only

Getting Started

Installation

npm install node-file-dialog

Usage

The configuration supports following dialog types

  • directory: Opens directory selection prompt
  • save-file: Opens save file prompt
  • open-file: Opens open file prompt
  • open-files: Opens open file prompt where multiple files can be selected
const dialog = require('node-file-dialog')
const config={type:'directory'}
dialog(config)
    .then(dir => console.log(dir))
    .catch(err => console.log(err))

It returns a promise with the list of selected files

[ '/path/to/selected/folder/or/files', ... ]

If nothing is selected, It throws an error

Error: Nothing selected

Keywords

FAQs

Last updated on 20 Dec 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc