1.0.2 • Published 7 years ago

cordova-plugin-fileviewer2 v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Cordova File Preview Plugin

This plugin can preview local files on your iOS device.

Supported Platforms

  • iOS

Installation

The plugin can be installed with the Cordova CLI:

cordova plugin add cordova-plugin-fileviewer2

The plugin is hosted on NPM so requires Cordova CLI 5.0.0 as a minimum. If you have any issues installing, make sure you have the most upto date version of Cordova from NPM:

npm install -g cordova

Usage

open a file

fileviewer2.open(cordova.file.documentsDirectory+'test.png',{ 
        error : function(e) { 
            console.log('Error status: ' + e.status + ' - Error message: ' + e.message);
        },
        success : function () {
            console.log('file opened successfully'); 				
        }
    }
);

close the fileviewer2

fileviewer2.dismiss();