Specify own path in file plugin

Hi,

     In my mobile application I have a download button which will download the binary content I have uploaded. To achieve this I am using "File Plugin" components "SaveFile" Action. Using this action the file is being downloaded to the "storage/android/data/com.myappidentifier" folder. How can I store it directly in the internal storage.

Regards,

Gowtham

I mean in the "downloads" folder of my internal storage.

Hi Gowtham,


Are you using your personal env mena cloud or OnPrimises env.


I am using my personal environment.

Hi, Gowtham I think you must check an original Cordova plugin an see how it's plugin work.
reference to this link https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html

from my experience, to download the file in ios or android  and then save the file to Downloads folder ( mean download folder phone system), you must set "Device Path" for android and ios in function RequestDirectoryFromFileSystem, I create a function like this  

if the device is android , set GetFileSystem javascript to  " var fileSystemType = cordova.file.externalRootDirectory + '/Download/'; " and if the device is IOS set "var fileSystemType = cordova.file.documentsDirectory;"

note:  for information, just Android Device can switch Selected Storage Type,  because of IOS save file just works on Internal storage