How do you store a file locally using Apache Cordova 3.4.0

后端 未结 3 606
长情又很酷
长情又很酷 2021-02-01 10:46

I am having a problem storing a file locally on an iOS (or android) device using apache cordova\'s \"file\" plugin. The problem I believe is setting the path properly.

3条回答
  •  忘掉有多难
    2021-02-01 11:30

    Your file path contains a typo (or a grammar error):

    var fileURL = "cdvfile://localhost/persistant/file.png";

    You should write it as persistent.

    Correct code:

    var fileURL = "cdvfile://localhost/persistent/file.png";
    

提交回复
热议问题