Skip to content

A Cordova Plugin For Previewing Files in iOS Device with QuickLook Framework

License

Notifications You must be signed in to change notification settings

nextsun/cordova-plugin-fileviewer2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

A Cordova Plugin For Previewing Files in iOS Device with QuickLook Framework

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published