Issue
I am using this package to upload image file and document file(pdf). For android its working perfectly and for ios i am able to copy image to app directory with copyPHImageToAppDirectory(rawData: PHAsset, fileName: any): Promise<{}> but for pdf file when trying these different methods it gives me an error
Code Snippet
mediafilepicker.on("getFiles", async function (res) {
let results = res.object.get('results');
console.log(">>>>>>>>>RESULTS>>", results)
try{
let localStore = await mediafilepicker.copyMPMediaFileToAPPDirectory(results, name)
}catch(err){
console.log("ERROR<<><>", err)
}
}
Issue I am using this package to upload image file and document file(pdf). For android its working perfectly and for ios i am able to copy image to app directory with copyPHImageToAppDirectory(rawData: PHAsset, fileName: any): Promise<{}> but for pdf file when trying these different methods it gives me an error
Code Snippet mediafilepicker.on("getFiles", async function (res) { let results = res.object.get('results'); console.log(">>>>>>>>>RESULTS>>", results) try{ let localStore = await mediafilepicker.copyMPMediaFileToAPPDirectory(results, name) }catch(err){ console.log("ERROR<<><>", err) } }
Error log CONSOLE LOG file:///app/bundle.js:1:233870: '>>>>>>>>>RESULTS>>' [ { type: 'normalFile', file: 'file:///private/var/mobile/Containers/Data/Application/F142712C-5B9A-4575-9A4B-86ECB30DA337/tmp/com.nativescript.salesforce-Inbox/test.pdf', rawData: {} }, [length]: 1 ]
[TypeError: e.valueForProperty is not a function. (In 'e.valueForProperty(MPMediaItemPropertyAssetURL)', 'e.valueForProperty' is undefined)]