weiwin123
weiwin123
  • 发布:2020-04-15 23:08
  • 更新:2020-04-15 23:08
  • 阅读:783

plus.io copyto 文件报错

分类:HTML5+

主要在 entry.copyto 那里

uni.chooseImage({
sourceType: ['camera', 'album'],
sizeType: ['compressed', 'original'],
count: this.imageList.length > this.count ? this.count - this.imageList.length : this.count,
success: (res) => {
console.log(JSON.stringify(res));
plus.io.resolveLocalFileSystemURL(res.tempFilePaths[0], (entry) => {

                        plus.io.requestFileSystem(plus.io.PUBLIC_DOWNLOADS, (suc) => {  
                            suc.root.getDirectory("zximgs", {  
                                create: true  
                            }, (sucdir) => {  
                                console.log(entry.fullPath);  
                                entry.copyTo(sucdir.root, entry.name, (e) => {  

                                }, (f) => {  
                                    console.log("1111")  
                                    console.log(f)  
                                });  

                            }, (faildir) => {  
                                console.log(faildir);  
                            })  

                        }, (fail) => {});  

                    }, (ff) => {  
                        console.log(ff)  
                    });  

                },  
                fail: (err) => {  

                }  
            })
2020-04-15 23:08 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复