Helper methods for moving and working with Files and ArrayBuffers
npm install @binary-files/web-file-moverts
getFileFromServer(url: string): Promise
`
Calling this function with a url string will return a promise that will resolve with an ArrayBuffer of the file fetched.
$3
`ts
saveFileToDevice(arrayBuffer: ArrayBuffer, filename: string, mimeType?: string): void;
`
Calling this function with an ArrayBuffer and a file name will trigger a download of the file.
$3
`ts
fileToArrayBuffer(file: File): Promise
`
Calling this function with a File you will get a promise that will resolve with the file's contents in an ArrayBuffer.
$3
`ts
fileChunkToArrayBuffer(file: File, startOffset: number, chunkSize: number): Promise
`
Calling this function with a File, a startOffset and chunkSize will give you an ArrayBuffer containing a
piece of the file starting from startOffset with a byte length of chunkSize`.