Nebulous Puffy Marshmallows

    open-file-dialog

    1.0.1 • Public • Published

    open-file-dialog stability

    npm version downloads js-standard-style

    Opens the browsers file dialog

    Usage

    var dialog = require('./')
     
    var btn = document.createElement('button')
    btn.innerText = 'Upload images'
    btn.addEventListener('click', function () {
      dialog({
        multiple: true,
        accept: 'image/*'
      }, function (images) {
        console.log(images)
      })
    })
     
    document.body.appendChild(btn)

    API

    dialog(opts, cb)

    • opts.multiple Allows selection of multiple files
    • opts.accept Specifies allowed file extensions or MIME types. more

    License

    MIT

    Install

    npm i open-file-dialog

    DownloadsWeekly Downloads

    10

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • f-mer