From 5ca2cf9f13e03228ebbda6cf9e1ebdb2d7644002 Mon Sep 17 00:00:00 2001 From: Equilibrium ITO Date: Wed, 28 Feb 2024 10:04:57 +0100 Subject: [PATCH] remove unnecessary code --- .../new-publication/new-publication.page.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts index 34cea006e..4e0cc2fdd 100644 --- a/src/app/pages/publications/new-publication/new-publication.page.ts +++ b/src/app/pages/publications/new-publication/new-publication.page.ts @@ -253,20 +253,6 @@ export class NewPublicationPage implements OnInit { this.filesSizeSum = this.filesSizeSum + element.size if (this.fileSizeToMB(this.filesSizeSum) <= 20) { - const reader = new FileReader(); - - // Define a função de callback para ser executada quando a leitura estiver completa - reader.onload = async () => { - // O resultado contém os dados do arquivo em formato de array de bytes (buffer) - const byteArray = new Uint8Array(reader.result as ArrayBuffer); - - // Agora você pode trabalhar com o array de bytes conforme necessário - console.log('BYTE ARRAY', byteArray); - }; - - // Inicia a leitura do arquivo como um array de bytes (buffer) - reader.readAsArrayBuffer(data[0]); - try { if (this.platform.is('ios')) { const result = await Filesystem.writeFile({