mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
send every type of file its possible now
This commit is contained in:
@@ -24,12 +24,13 @@
|
||||
<img src="{{image}}">
|
||||
</div>
|
||||
<div *ngIf="type == 'application/pdf'">
|
||||
<iframe width="100%" height="100%" [src]="base64Sanitize" type="application/vnd.openxmlformats-officedocument.wordprocessingml.document"></iframe>
|
||||
|
||||
<pdf-viewer [src]="image"
|
||||
<!-- <pdf-viewer [src]="image"
|
||||
[render-text]="true"
|
||||
[original-size]="false"
|
||||
style="width: 400px; height: 500px"
|
||||
></pdf-viewer>
|
||||
></pdf-viewer> -->
|
||||
</div>
|
||||
</div>
|
||||
</ion-slide>
|
||||
|
||||
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user