Implement ETag to refresh the page image for familiy settings
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
<div class="ion-padding" slot="content">
|
||||
|
||||
<ion-card style="margin: 0px">
|
||||
<img alt="Family" src="{{session_image_server}}/{{curr_session}}/familybanner/{{member_uid}}" />
|
||||
<img alt="Family" src="{{session_image_server}}/{{curr_session}}/familybanner/{{member_uid}}?{{etag}}" />
|
||||
<ion-card-content style="text-align: right;">
|
||||
<ion-button size="small" (click)="startCamera()">Change Banner</ion-button>
|
||||
</ion-card-content>
|
||||
|
||||
@@ -26,14 +26,18 @@ export class FamilysettingsPage implements OnInit {
|
||||
member_uid:string='';
|
||||
curr_session:string='';
|
||||
session_image_server:string='';
|
||||
|
||||
etag:string='';
|
||||
|
||||
ngOnInit() {
|
||||
this.member_uid= this.sessionDataProviderService.member_uid;
|
||||
this.member_uid = this.sessionDataProviderService.member_uid;
|
||||
this.curr_session = this.sessionDataProviderService.session;
|
||||
this.session_image_server = this.sessionDataProviderService.session_image_server;
|
||||
this.etag = '' + Date.now();
|
||||
|
||||
}
|
||||
|
||||
ionViewWillEnter() {
|
||||
this.etag = '' + Date.now();
|
||||
}
|
||||
|
||||
uploadData: {
|
||||
@@ -86,6 +90,7 @@ export class FamilysettingsPage implements OnInit {
|
||||
loading.dismiss()
|
||||
this.uploadResult = uploadResult;
|
||||
console.log("this.wrenchService.uploadFile RETURN DATA->", this.uploadResult);
|
||||
this.etag = '' + Date.now();
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user