File Picker for IOS in Ionic

brother I have shared the code.

You can see it in the top

1 Like

thanks…bro…Now its working

You Rock, bro! When I am messing up with Electron + Ionic but the Electron ‘Dialog’ cannot call out fs function. Thanks a lot! Save my whole day!

I’ve created this demo component based on @killerchip and on this answer to easily test picking images (it shows the picked images in the browser/webview):

import { Component } from '@angular/core';

	selector: 'my-demo-file-chooser',
	template: `
		<input type="file" name="img" multiple (change)="onChange($event)">
		<div *ngFor="let fileUrl of fileUrls">
			<img [src]="fileUrl" />
export class DemoFileChooserComponent {

	public fileUrls: string[] = [];
	public onChange(event: Event) {
		let target = event &&;
		let files: Array<File> = target && target['files'];

		if (files && files.length) {
			files = Array.from(files);
			console.log('files', files); => {
				return this.readFile(file).then(src => {
					console.log('file loaded', file);
					error => console.error('file error', file, error)

	private readFile(file: File): Promise<string> {
		return new Promise((resolve, reject) => {
			let fileReader = new FileReader();

			fileReader.onload = () => resolve(fileReader.result);

			fileReader.onerror = error => reject(error);

			fileReader.onabort = error => reject(error);

Just include in your HTML to test:



i have install file picker plugin from here

declare var FilePicker: any;
 if ('ios')){

			FilePicker.isAvailable(function (avail) {
				this.presentalert(avail ? "one" : "NO");

Don’t have any idea what is going wrong any one please help me

thanks in advance

If i want to select pdf files, then the file name has changed and the type of the selected file is empty. You can check in the console logs. And this is happening only for android. What’s the issue here?


I have Used FilePicker ios plugin.

        this.choosenfilepath = uri;
        this.validext = true;

this.choosenfilepath i found ‘/private/var/mobile/containers/data/…’ that path how can choose file from this path anyone help me please


@setu1421 I tested with a pdf file and it worked fine in a real Android 6 device (Moto G2).

This is the log I received in browser (but it worked fine in android too):


(I don’t use a file reader to show the image tough, it would probably need to use some library to show the thumbnail, but I can upload it both in browser and in android)

Hi how I can use this plugin in ionic 1

Can you access library file (video and photo) of ios and select it with this plugin?
I have trying this plugin but I can’t access photo or video, it just showing icloud with empty data.
Or do you know any cordova plugin that work on ios and can get fullpath of file?

Would appreciate if you could help me!