Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

select-files

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

select-files

Virtually creates a file input element (), triggers it and returns selected files.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

selectFiles

Build Status License Library minified size Library minified + gzipped size

Virtually creates a file input element (<input type="file" />), triggers it and returns selected files.

import selectFiles from 'select-files';

selectFiles({ accept: 'image/*', capture: 'camera' }).then(files => {
  // ...
});

Installation

This library is published in the NPM registry and can be installed using any compatible package manager.

npm install select-files --save

# For Yarn, use the command below.
yarn add select-files

Installation from CDN

This module has an UMD bundle available through JSDelivr and Unpkg CDNs.

<!-- For UNPKG use the code below. -->
<script src="https://unpkg.com/select-files"></script>

<!-- For JSDelivr use the code below. -->
<script src="https://cdn.jsdelivr.net/npm/select-files"></script>

<script>
  // UMD module is exposed through the "selectFiles" global function.
  selectFiles({ multiple: true }).then(files => {
    console.log(files);
  });
</script>

Documentation

Documentation generated from source files by Typedoc.

License

Released under MIT License.

Keywords

FAQs

Package last updated on 07 May 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc