Add an admin action that rebuilds preview proxies

A library imported by an older pipeline keeps whatever proxy it was given, and
the editor can only show those bytes. The Storage tab now re-decodes every
camera raw from its original, writing a fresh JPEG proxy, thumbnail, 16-bit
sidecar and denoise prune, then stamps previewVersion so browsers refetch.

The decode loop runs one photo at a time on the server behind a status route:
an hour of LibRaw work would time out as a request, and parallel decodes would
starve the editor. The single-photo reprocess route shares the same helper.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-28 06:20:44 +00:00
parent 2bec4102a2
commit 158dccddf1
6 changed files with 342 additions and 30 deletions
+2
View File
@@ -599,6 +599,8 @@ routes are public and are gated only by the share token.
| POST | `/api/admin/catalog` | Restore a backup produced by the GET |
| GET | `/api/admin/storage` | Current and default storage roots, custom flag |
| PUT | `/api/admin/storage` | Move image storage to another absolute path |
| GET | `/api/admin/previews/rebuild` | Progress of the raw proxy rebuild |
| POST | `/api/admin/previews/rebuild` | Re-decode every camera raw into a fresh proxy, thumbnail and 16-bit sidecar |
| PATCH | `/api/admin/quotas/:id` | Set an account's byte limit |
| POST | `/api/admin/quotas/:id/prune` | Compute the oldest-first plan and schedule it 24 h out |
| DELETE | `/api/admin/quotas/:id/prune` | Cancel a scheduled cleanup |