mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 21:47:39 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user