#Ti.FilePicker
This module written by Jorge and Rainer
is an Titanium Android module for picking files from device.
##Interface
varFilePicker=require("ti.filepicker");FilePicker.getFileSelectDialog({mimeTypes: ["*/pdf"],suffix : ".pdf",resultType : FilePicker.TYPE_FILE,destinationStorage : FilePicker.TEMP_STORAGE,// or EXTERNAL_STORAGEonSuccess : function(_e){varresultFile=_e.file;}});In case of file result you can choose the destination with property destinationStorage In case of EXTERNAL_STORAGE don't forget to remove later … For usage of external storage on devices ≥ Marshmellow you need
- entry in manifest
- run time permissions
Or:
varFilePicker=require("ti.filepicker");FilePicker.getFileSelectDialog({mimeTypes: ["*/pdf"],resultType : FilePicker.TYPE_BLOBonSuccess : function(_e){varresultBlob=_e.blob;}});
