feat(timelapse): add upload and remove timelapse management (#406)

When the auto-scan attached the wrong timelapse (e.g. from a different
print), there was no way to fix it — the file couldn't be removed and
re-scanning was disabled once a timelapse was attached.
This commit is contained in:
maziggy
2026-02-17 08:49:32 +01:00
parent c82521efc9
commit bc78f3f456
12 changed files with 395 additions and 69 deletions
+4
View File
@@ -2654,6 +2654,10 @@ export const api = {
`/archives/${id}/timelapse/select?filename=${encodeURIComponent(filename)}`,
{ method: 'POST' }
),
deleteArchiveTimelapse: (id: number) =>
request<{ status: string }>(`/archives/${id}/timelapse`, {
method: 'DELETE',
}),
uploadArchiveTimelapse: async (archiveId: number, file: File): Promise<{ status: string; filename: string }> => {
const formData = new FormData();
formData.append('file', file);