File pludgin not create directory

im using outsystem service studio 11 to build android mobile. im still new in outsystem, i try using file pludgin to create directory on mobile (see attachment). when i try to run i got eror : cannot read property 'getDirectory' of null. how do I fix it ?

Hi Deddy,

There is already fileplugin sample component on forge,Please go through. Hope it will help you.

Regards,

Koushik



Hi,

You have provided wrong path. You need to provide without file:///, the plugin has hard coded to create directory inside cordova.file.externalDataDirectory (look https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/#ios-file-system-layout for more details) for external, which will translate to Android/data/<app-id>/files in android.

Check this post https://stackoverflow.com/questions/18826517/how-to-create-subfolder-using-cordova which has a sample of how you can create a folder using cordova, you can add the script in one of the javascript node in client action. you need to have file plugin as reference in you app.

Regards.

Prasad Rao wrote:

Hi,

You have provided wrong path. You need to provide without file:///, the plugin has hard coded to create directory inside cordova.file.externalDataDirectory (look https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/#ios-file-system-layout for more details) for external, which will translate to Android/data/<app-id>/files in android.

Check this post https://stackoverflow.com/questions/18826517/how-to-create-subfolder-using-cordova which has a sample of how you can create a folder using cordova, you can add the script in one of the javascript node in client action. you need to have file plugin as reference in you app.

Regards.




I'm sorry, but i Still dont understand to fix it, could you give me a sample if i use file pludgin and i want to create a folder named "example" in external storage ?