feat: download and preview files from local backups automatically, if a local backup is available (#2076)

This commit is contained in:
Mo
2022-12-01 11:56:28 -06:00
committed by GitHub
parent e07fed267f
commit 28e43d37c0
34 changed files with 739 additions and 110 deletions

View File

@@ -1,4 +1,4 @@
import { ByteChunker, OnChunkCallback } from '@standardnotes/files'
import { ByteChunker, OnChunkCallbackNoProgress } from '@standardnotes/files'
import { FileReaderInterface } from './../Interface/FileReader'
import { FileSelectionResponse } from '../types'
@@ -39,7 +39,7 @@ async function selectFiles(): Promise<File[]> {
async function readFile(
file: File,
minimumChunkSize: number,
onChunk: OnChunkCallback,
onChunk: OnChunkCallbackNoProgress,
): Promise<FileSelectionResponse> {
const byteChunker = new ByteChunker(minimumChunkSize, onChunk)
const stream = file.stream() as unknown as ReadableStream