refactor(backup): auto-delete file from server after download and simplify header buttons

This commit is contained in:
Ray1111-aa
2026-10-28 11:46:31 +07:00
parent 0d78318dfe
commit aad095f0f9
2 changed files with 6 additions and 6 deletions
@@ -162,11 +162,16 @@ class BackupController extends Controller
targetName: $filename
);
// Perbarui status di log riwayat dan hapus file sementara dari disk VPS setelah unduhan selesai
BackupLog::where('filename', $filename)->update([
'status' => 'Tersimpan di Komputer Lokal',
]);
return response()->download($fullPath, $filename, [
'Cache-Control' => 'no-cache, no-store, must-revalidate',
'Pragma' => 'no-cache',
'Expires' => '0',
]);
])->deleteFileAfterSend(true);
}
/**