Cordova-DocPicker
iOS plugin for Cordova written in Swift.
Opens the file picker on iOS for the user to select a file, returns a file URI. Allows the user to upload files from icloud.
Installation
Navigate to your project directory and install the plugin with cordova plugin add https://github.com/iampossible/Cordova-DocPicker.git
or npm i cordova-documentpicker
.
Methods
There is only one method available all return promises, or accept success and error callbacks.
DocumentPicker.getFile
Usage
DocumentPicker.getFile
Typescript
; constructorprivate docPicker: DocumentPicker ... this.docPicker.getFileDocumentPickerOptions.ALL // DocumentPickerOptions.IMAGE and DocumentPickerOptions.PDF are also available.thenconsole.loguri.catchconsole.loge;
Javascript
/// Fetchs for all types of documentsDocumentPicker
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/iampossible/Cordova-DocPicker.