🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

show-open-file-picker

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

show-open-file-picker

A cross-browser ponyfill or polyfill for showOpenFilePicker

latest
Source
npmnpm
Version
0.4.0
Version published
Weekly downloads
512
-12.33%
Maintainers
1
Weekly downloads
 
Created
Source

show-open-file-picker

A cross-browser ponyfill or polyfill for showOpenFilePicker() and showSaveFilePicker().

The showOpenFilePicker() method shows a file picker that allows a user to select a file or multiple files and returns a handle for the file(s).

npm install show-open-file-picker

MDN Documentation

Usage

<script src="https://cdn.jsdelivr.net/npm/show-open-file-picker/polyfill.js"></script>

<button id="button">Show Open File Picker</button>

<script>
button.onclick = () => {
  showOpenFilePicker({
    types: [
      {
        description: "Images",
        accept: {
          "image/*": [".png", ".gif", ".jpeg", ".jpg"],
        },
      },
    ],
    excludeAcceptAllOption: true,
    multiple: false,
  })
}
</script>
import { showOpenFilePicker } from 'show-open-file-picker'

button.onclick = () => {
  showOpenFilePicker({
    types: [
      {
        description: "Images",
        accept: {
          "image/*": [".png", ".gif", ".jpeg", ".jpg"],
        },
      },
    ],
    excludeAcceptAllOption: true,
    multiple: false,
  })
}

Keywords

access

FAQs

Package last updated on 01 Jul 2025

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