Socket
Socket
Sign inDemoInstall

open-file-dialog

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    open-file-dialog

Opens the browsers file dialog


Version published
Weekly downloads
9
decreased by-77.5%
Maintainers
1
Install size
3.77 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 15 Jul 2017

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