feat: include uploads folder in network sync (all three subfolders)
Daily sync and Sync Now both pull database + uploads in one operation. PC1 streams uploads/ as a zip via GET /network-backup-files (archiver). PC2 clears cloud-storage, patients, and patient-documents then extracts the fresh copy before resolving. Timeout extended to 5 min for large files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -189,9 +189,9 @@ export function NetworkBackupManager() {
|
||||
<div className="space-y-4">
|
||||
<p className="text-sm font-semibold text-gray-800">Sync from Another PC</p>
|
||||
<p className="text-xs text-gray-500">
|
||||
Configure this machine to pull a fresh copy of the database from another PC at
|
||||
a scheduled time each day. Enter the source PC's local IP address and its
|
||||
Backup Key.
|
||||
Configure this machine to pull a fresh copy of the database and all uploaded
|
||||
files (patient photos, cloud storage, documents) from another PC at a scheduled
|
||||
time each day. Enter the source PC's local IP address and its Backup Key.
|
||||
</p>
|
||||
|
||||
{/* Enable toggle + time picker on same row */}
|
||||
@@ -256,7 +256,7 @@ export function NetworkBackupManager() {
|
||||
variant="outline"
|
||||
onClick={() => syncNowMutation.mutate()}
|
||||
disabled={syncNowMutation.isPending || !sourceUrl || !receiverApiKey}
|
||||
title="Pull and restore now (replaces this machine's database)"
|
||||
title="Pull and restore now — replaces this machine's database and uploads folder"
|
||||
>
|
||||
<RotateCcw className="h-4 w-4 mr-1" />
|
||||
{syncNowMutation.isPending ? "Syncing…" : "Sync Now"}
|
||||
|
||||
Reference in New Issue
Block a user