Skip to Content
SdkReactInternalFunctionsreadEncryptedFile

readEncryptedFile

readEncryptedFile(fileId: string, encryptionKey: CryptoKey): Promise<{ blob: Blob; metadata: StoredFileMetadata; } | null>

Defined in: src/lib/storage/opfs.ts:197 

Reads and decrypts a file from OPFS.

Parameters

ParameterTypeDescription

fileId

string

The file identifier

encryptionKey

CryptoKey

CryptoKey for decryption

Returns

Promise<{ blob: Blob; metadata: StoredFileMetadata; } | null>

The decrypted blob, or null if not found

Last updated on