send every type of file its possible now

This commit is contained in:
Eudes Inácio
2022-04-06 16:25:47 +01:00
parent 74a9b787e9
commit a998bee230
8 changed files with 283 additions and 179 deletions
+2 -7
View File
@@ -20,7 +20,7 @@ export class ViewMediaPage implements OnInit {
maxRation: 2
};
base64Sanitize = "";
base64Sanitize:any = "";
constructor(
private modalController: ModalController,
@@ -38,12 +38,7 @@ export class ViewMediaPage implements OnInit {
ngOnInit() {
console.log(this.image)
const encodedData = btoa(this.image);
const blob = new Blob([this.b64toBlob(encodedData)], { type: 'application/pdf' });
this.base64Sanitize = URL.createObjectURL(blob);
//this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.base64Sanitize);
this.base64Sanitize;
this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.image);
console.log(this.base64Sanitize)
}