/ui-document-picker

A NativeScript plugin that allows you to select files from the device.

Primary LanguageJavaApache License 2.0Apache-2.0

@nativescript-community/ui-document-picker

Downloads per month NPM Version

A NativeScript plugin that allows you to select files from the device.


Table of Contents

Installation

Run the following command from the root of your project:

ns plugin add @nativescript-community/ui-document-picker

Configuration

Add any other additional configuration instructions here.

API

There is one function exported:

export interface FilePickerOptions {
    extensions: string[];
    multipleSelection?: boolean;
    pickerMode?: number; //iOS only
}

export function openFilePicker(params: FilePickerOptions): Promise<{ files: string[]; ios?: NSURL; android?: android.net.Uri }>;

Vue

Examples

Demos and Development

Setup

To run the demos, you must clone this repo recursively.

git clone https://github.com/@nativescript-community/ui-document-picker.git --recursive

Install Dependencies:

npm i # or 'yarn install' or 'pnpm install'

Interactive Menu:

To start the interactive menu, run npm start (or yarn start or pnpm start). This will list all of the commonly used scripts.

Build

npm run build

npm run build.angular # or for Angular

Demos

npm run demo.[ng|react|svelte|vue].[ios|android]

npm run demo.svelte.ios # Example

Questions

If you have any questions/issues/comments please feel free to create an issue or start a conversation in the NativeScript Community Discord.