Created
June 9, 2017 15:34
-
-
Save matthieu-D/54d4586067a8abc1954e5a33d2c451a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class AccountPage { | |
@ViewChild('avatar') avatarInput; | |
private s3: any; | |
public avatarPhoto: string; | |
public selectedPhoto: Blob; | |
public attributes: any; | |
public sub: string = null; | |
constructor(public navCtrl: NavController, | |
public user: User, | |
public db: DynamoDB, | |
public config: Config, | |
public camera: Camera, | |
public loadingCtrl: LoadingController) { | |
let self = this; | |
this.attributes = []; | |
this.avatarPhoto = null; | |
this.selectedPhoto = null; | |
this.s3 = new AWS.S3({ | |
'params': { | |
'Bucket': config.get('aws_user_files_s3_bucket') | |
}, | |
'region': config.get('aws_user_files_s3_bucket_region') | |
}); | |
this.sub = AWS.config.credentials.identityId; | |
user.getUser().getUserAttributes(function(err, data) { | |
self.attributes = data; | |
self.refreshAvatar(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment