apache / cordova-plugin-file-transfer

Apache Cordova File Transfer Plugin
https://cordova.apache.org/
Apache License 2.0
596 stars 888 forks source link

Uncaught ReferenceError: loadingStatus is not defined #206

Closed Benoit1980 closed 3 years ago

Benoit1980 commented 5 years ago

Hello,

Phonegap 8.0.0 Android 7.0.0

On this line: loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total);

I keep seeing in the console "Uncaught ReferenceError: loadingStatus is not defined"

janpio commented 5 years ago

Hm, this might very well be a bug in the documentation. loadingStatus only appears in the README and the tests, same for .setPercentage(...).

So that code probably doesn't work as it should but is some UI artifact that maybe was supported before or is just a bad copy/paste from somewhere. was there from the start when the documentation was created: https://github.com/apache/cordova-plugin-file-transfer/commit/102e7afc9399fc7cb2c15e7c6bfd319c9dab3aac#diff-5db2c860d4e7e5ef74eb7cfc33d99f8eR137

You will have to replace those few lines with your own UI implementation of a progress bar I guess.

Benoit1980 commented 5 years ago

Thanks for the reply. I understand now :-)

janpio commented 5 years ago

Let's leave this issue open as it is a honest bug in the README that should be fixed.