mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
fix publication
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user