angular - 使用 AWS Amplify 将文件上传到 S3 时获取上传进度状态
问题描述
我正在使用aws-amplify
sdk 通过 Angular 将文件上传到 S3,我想查看已将多少文件上传到存储桶。
Storage.put(id, name)
.then (result => console.log(result))
.catch(err => console.log(err)).on('httpUploadProgress', function(progress) {
// Here you can use `this.body` to determine which file this particular
// event is related to and use that info to calculate overall progress.
});
这不起作用,我似乎无法找到解决方案。
解决方案
Amplify 文档现在包括这个 - https://aws-amplify.github.io/docs/js/storage#put
推荐阅读
- c# - 我正在尝试检查我的输入是否包含小写或大写字母:
- python - 配置不当。视图缺少查询集。定义模型、查询集或覆盖 get_queryset()
- r - 为什么 onewaytests 和 HH 包对 R 中的 Brown-Forsythe 测试给出不同的结果,并且至少其中一个是正确的?
- dart - 更新后如何解决此代码类飞镖中的问题
- kubernetes - Kubernetes 在使用配额时卡在“ContainerCreating”上
- html - Hugo / 浏览器不显示 webp 图像
- python - ModuleNotFoundError:没有名为“django.contrib.wagtail”的模块
- r - geom_label 中的下标
- linux - Linux bash/shell 如何读取我们给它的命令?
- c# - 没有 Task.Delay,Quartz 作业无法执行