/** * @file DatabaseBackupService.ts * @description Web-specific implementation of the DatabaseBackupService * @author Matthew Raymer * @version 1.0.0 */ import { DatabaseBackupService } from "../../DatabaseBackupService"; export default class WebDatabaseBackupService extends DatabaseBackupService { protected async handleBackup(blob: Blob): Promise { // Web platform handling const url = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url; a.download = `database-backup-${new Date().toISOString()}.json`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } }