/macos-open-file-dialog

A utility to open a select file dialog from node.js on MacOS

Primary LanguageJavaScript

MacOS Open File Dialog

To install the utility use npm

npm i macos-open-file-dialog

You can then import and use the async utilities:

const { openFile, openFolder } = require("macos-open-file-dialog")

const filePath = await openFile("Select a file")
const imagePath = await openFile("Select a photo", ["jpg", "jpeg", "png"])

const folderPath = await openFolder("Select a folder")