JSPM

node-file-dialog

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 181
  • Score
    100M100P100Q76209F
  • License ISC

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

Package Exports

  • node-file-dialog

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-file-dialog) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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