Skip to Content
SdkReactInternalFunctionswriteEncryptedFile

writeEncryptedFile

writeEncryptedFile(fileId: string, blob: Blob, encryptionKey: CryptoKey, metadata?: object): Promise<void>

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

Writes an encrypted file to OPFS.

Parameters

ParameterTypeDescription

fileId

string

Unique identifier for the file

blob

Blob

The file content

encryptionKey

CryptoKey

CryptoKey for encryption

metadata?

object

Optional metadata (name, type, sourceUrl)

metadata.name?

string

metadata.sourceUrl?

string

Returns

Promise<void>

Last updated on