Skip to main content

Function: tryBuildSerializedDatabaseRestorePayloadFromFile()

tryBuildSerializedDatabaseRestorePayloadFromFile(args: { file: File; maxBytes: number; }): Promise<SqliteRestorePayloadBuildResult>

Defined in: src/components/Settings/utils/sqliteRestorePayload.ts:24

Validates a user-selected SQLite backup file and builds the IPC payload.

Parametersโ€‹

argsโ€‹

fileโ€‹

File

maxBytesโ€‹

number

Returnsโ€‹

Promise<SqliteRestorePayloadBuildResult>

Remarksโ€‹

Settings restores send the file contents through IPC. This helper enforces a byte budget prior to reading the file into memory, and produces stable error messages used by the Settings controller.