题海让大学四年没有难题
白天模式登陆

题目详情

单选题 以下哪段代码能正确上传图片并监听进度

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

Copyright © 2022 津ICP备2021001502号