npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nativescript-filepickers

v1.0.3

Published

A plugin for the NativeScript framework implementing multiple image picker

Readme

nativescript-filepickers apple android

Features

  • Supports scoped storage
  • Can open file from both external and app's internal storage
  • Can get path from both external and app's internal storage
  • Can copy files to internal storage
  • nativescript-filepickers plugin supporting both single and multiple selection.
  • Supports any kinds of extensions

(NEW) @1.0.3

  • Show just once and always options while opening file with OpenFile(path) Example:
    import { CopyTo, Create, Extensions, Modes, OpenFile } from "nativescript-filepickers";
    
    const context = Create({
        extensions: ['pdf', 'xls'],
        mode: Modes.Single,
    });
    context
        .Authorize()
        .then(() => {
        return context.Present();
        })
        .then((assets) => {
            assets.forEach((asset) => {
                const newPath = CopyTo(asset);
                OpenFile(newPath);
                this.selectedImages.push(newPath);
                console.log("Real Path: " + asset);
                console.log("Copied Path: " + newPath);
            });
        });

Supported platforms

| OS | Version | | ---------------------------- | ------------------------- | | Android 11 | API 30 | | Android 10(partially tested) | API 29(partially tested) | | Android 9(partially tested) | API 28(partially tested) | | IOS support is coming | IOS support is coming |

npm i nativescript-filepickers

Import the plugin

TypeScript

import { CopyTo, Create, Extensions, Modes, OpenFile } from "nativescript-filepickers";

Create filepicker

Create filepicker in single or multiple mode to specifiy if the filepicker will be used for single or multiple selection of images

TypeScript

const context = Create({
    extensions: ['pdf', 'xls'],
    mode: Modes.Single,
});

Request permissions, show the images list and process the selection

context
    .Authorize()
    .then(() => {
    return context.Present();
    })
    .then((assets) => {
        assets.forEach((asset) => {
            const newPath = CopyTo(asset);
            this.selectedImages.push(newPath);
            console.log("Real Path: " + asset);
            console.log("Copied Path: " + newPath);
        });
    });

NOTE: To request permissions for Android 6+ (API 23+) we use nativescript-permissions.

NOTE: To be sure to have permissions add the following lines in AndroidManifest.xml

<manifest ... >
	<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
	<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />

  <application android:requestLegacyExternalStorage="true" ... >
    ...
  </application>
</manifest>

API

Methods

  • Create(options) - creates instance of the filepicker. Possible options are:

| Option | Platform | Default | Description | | ---------- | -------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------- | | mode | both | Modes.Single | The mode if the filepicker. Possible values are Modes.Single for single selection and Modes.Multiple for multiple selection. | | extensions | both | -- | Choose Extensions.All for accepting all types of files or explicitly define types array like ['pdf', 'xls', 'png'] |

  • Authorize() - request the required permissions.
  • Present() - show the albums to present the user the ability to select files. Returns an array of the selected file's actual path on device.
  • OpenFile(path: string, isAbsolute = false) - It opens file from both app's internal storage and external storage if isAbsolute flag is true.
  • CopyTo(path: string) - It copied files from path to app's internal storage and returns the destination path.

License

Apache License Version 2.0