主要在 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) => {
}
})
0 个回复