(aws-amplify) 为什么 progressCallback 只在上传完成时执行?
(aws-amplify) Why progressCallback only gets executed when the upload is finished?
const stored = await Storage.put(filename, file, {
contentType: file.type,
customPrefix: customPrefix,
progressCallback(progress) {
console.log(progress)
},
})
这只会在上传完成后执行。我错过了什么?
我已经弄明白了,原因其实很愚蠢.....上传的文件太小(1mb)无法获得不止一个关于进度的更新。
const stored = await Storage.put(filename, file, {
contentType: file.type,
customPrefix: customPrefix,
progressCallback(progress) {
console.log(progress)
},
})
这只会在上传完成后执行。我错过了什么?
我已经弄明白了,原因其实很愚蠢.....上传的文件太小(1mb)无法获得不止一个关于进度的更新。