FileTransfer browser problem


I use ionic-native “FileTranfer” plugin to use
He works very well on android…but not with the browser (i tested only with chrome and edge) !

Error: Uncaught (in promise): ReferenceError: FileTransfer is not defined
at resolvePromise (http://localhost:8100/build/js/zone.js:558:32)
at http://localhost:8100/build/js/zone.js:594:18
at ZoneDelegate.invokeTask (http://localhost:8100/build/js/zone.js:365:38)
at Object.onInvokeTask (http://localhost:8100/build/js/app.bundle.js:39633:41)
at ZoneDelegate.invokeTask (http://localhost:8100/build/js/zone.js:364:43)
at Zone.runTask (http://localhost:8100/build/js/zone.js:265:48)
at drainMicroTaskQueue (http://localhost:8100/build/js/zone.js:497:36)
at XMLHttpRequest.ZoneTask.invoke (http://localhost:8100/build/js/zone.js:437:26)

Your system information:

Cordova CLI: 6.3.0
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.37
Ionic App Lib Version: 2.0.0-beta.20
Node Version: v4.4.7

The following directory exists in my project (after the build process…the plugin is installed) : platforms/browser/platform_www/plugins/cordova-plugin-file-transfer

If I believe the readme file of the plugin, he supports the browser (he uses xhr to send the request).

May be its a problem with the ionic-native wrapper but i don’t understand why…

Any idea ?

Thx !

The file transfer plugin will not work in the browser. It depends hardware that is not available in the browser.

Cordova hardware plugins can only be used on devices and emulators.

Have you imported the file transfer wrapper? We could use a code snippet or something. Would make helping easier.