fix publication

This commit is contained in:
peter.maquiran
2025-09-17 18:37:35 +01:00
parent 5f7295d41c
commit 3eecedb23f
64 changed files with 1043 additions and 873 deletions
+12 -12
View File
@@ -27,7 +27,7 @@ export class ViewMediaPage implements OnInit {
private navParams:NavParams,
public sanitizer: DomSanitizer,
private platform: Platform,
) {
this.image = this.navParams.get('image')
this.type = this.navParams.get('type')
@@ -38,32 +38,32 @@ export class ViewMediaPage implements OnInit {
ngOnInit() {
this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.image);
this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.image);
if (this.platform.is('desktop')) {
this.view = true;
} else {
this.view = false;
}
if (this.platform.is('desktop')) {
this.view = true;
} else {
this.view = false;
}
}
b64toBlob = (b64Data, contentType = '', sliceSize = 512) => {
const byteCharacters = atob(b64Data);
const byteArrays = [];
for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
const slice = byteCharacters.slice(offset, offset + sliceSize);
const byteNumbers = new Array(slice.length);
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i);
}
const byteArray = new Uint8Array(byteNumbers);
byteArrays.push(byteArray);
}
const blob = new Blob(byteArrays, { type: contentType });
return blob;
};