题目详情
单选题 以下哪段代码能正确上传图片并监听进度
A. uni.uploadFile({ url: "https://api.com/upload", filePath: "xxx", name: "file" })
B. uni.uploadFile({ url: "https://api.com/upload", filePath: "xxx", name: "file", onProgress: (res) => {} })
C. const uploadTask = uni.uploadFile({ url: "https://api.com/upload", filePath: "xxx", name: "file" }); uploadTask.onProgressUpdate((res) => { console.log(res.progress); })
D. uni.uploadFile({ url: "https://api.com/upload", filePath: "xxx", name: "file", method: "GET" })

学科:默认课程
时间:2025-11-03 12:39:37
相关题目
相关作业
