uni.chooseFile({
count: 1, //默认100
type: "all",
success: function (res) {
let sourceFilePath = res.tempFiles[0].path;
// 例如:"file://docs/storage/Users/currentUser/Documents/%E6%AC%A2%E8%BF%8E%E4%BD%BF%E7%94%A8%E5%8D%8E%E4%B8%BA%E6%96%87%E4%BB%B6%E7%AE%A1%E7%90%86.pdf"
// res.tempFiles
}
})
//uts 插件
import { fileIo as fs } from '@kit.CoreFileKit';
fs.accessSync(sourceFilePath);
0 个回复