首页 > 解决方案 > 如何使用 Amplify 将图片上传到 AWS Cognito?

问题描述

我在 Angular 中使用 Amplify,似乎找不到设置图片属性的方法。所有其他属性都可以正常工作

      Auth.completeNewPassword(
        user,
        this.profileForm.get('newPassword')?.value,
        {
          "phone_number": String(this.profileForm.get('phone')?.value),
          "given_name": this.profileForm.get('fName')?.value,
          "family_name": this.profileForm.get('lName')?.value,
          "locale": this.profileForm.get('language')?.value,
          "picture": // How do I set this with a file uploader input?
        }
      )
      .then(data => console.log("Changed Password! -->", data))
      .catch(err => console.log("Password change failed: ", err));

标签: amazon-cognitoaws-amplify

解决方案


推荐阅读