Files

{#if files.length === 0}

No files yet. Add one below so this book can be read or downloaded.

{/if}
{ try { await submit(); const issues = uploadBookFiles.fields.allIssues(); if (issues && issues.length > 0) return; // The endpoint answers with the updated book, so the new files come // back with their ids rather than having to be guessed at. files = uploadBookFiles.result?.files ?? files; uploadBookFiles.fields.files.set([]); toast.success('Files added'); } catch (error) { console.error('Failed to add files: ', error); toast.error(apiMessage(error) ?? 'Failed to add files'); uploadBookFiles.fields.files.set([]); } })} enctype="multipart/form-data" class="flex flex-col gap-2" >
Remove {fileToDelete?.filename}? This cannot be undone. The other files on this book are not affected.
Also delete the file from the filesystem
Cancel Remove