mramonlopez / cordova-plugin-file-downloader

Phonegap plugin to download a list of files or a single file to the phone, check consistency and unzip if necessary (Android and ios)
MIT License
23 stars 19 forks source link

window.cordova.downloader.init stating undefined. Error shown in (Safari Preview) #16

Open rohitattaluri opened 3 years ago

rohitattaluri commented 3 years ago

Hi,

I was trying to download a document from internet (via a URL).

Using this plugin for angular application (building ios app using cordova)

Here's the code i wrote for it.

Using cordova-plugin-file-downloader window.cordova.downloader.inint({folder: "Downloads"}); window.downloader.get(filePath); // filePath will have the url of the file to be downloaded.

image

John5280 commented 3 years ago

I am having the same problem. I used "cordova plugin add cordova-plugin-file-downloader". But the "cordova build ios" command does not put it under the pluggins folder. In the package.json file, it is in the devDependencies object but is not listed in the cordova.plugins object. If I manually add it to the cordova.plugins object in the package.json file, it does not help. Thanks.