import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpEventType } from '@angular/common/http'; @Injectable({ providedIn: 'root' }) export class StreamService { constructor( private http: HttpClient, ) { window["StreamService"] = this } } // const text = 'Hello, World00120301010asdf1002sdf 0fsdfasf0001230 12300!\n'; // const base64 = btoa(text); // let chunks = window["ChunkService"].generateChunkOfUint8Array(base64, 8) // window.StreamService.uploadChunk("", chunks, "peter12", "txt")