phonegap “new FileTransfer” “is not defined”

后端 未结 3 692
挽巷
挽巷 2021-02-14 08:19

I get the following error:

    ReferenceError: FileTransfer is not defined

when i try to create a new instance:

    var ft = ne         


        
3条回答
  •  野性不改
    2021-02-14 08:43

    Did you add the 'file' or 'file-transfer' plugin?

    The Filetransfer plugin is a separate plugin, and you need to add both of them:

    cordova plugin add cordova-plugin-file-transfer
    

    Otherwise, the 'FileTransfer' is indeed not defined.

提交回复
热议问题