Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
123456789101112131415161718// Workspace's default namespace stores R2 objects under <name>/default/<path>.// Delete the facet first, then its objects, without waking the child during// parent startup recovery (the child's initialization can call the parent).export async function deleteConversationAttachmentObjects( bucket: R2Bucket | undefined, conversationId: string,): Promise<void> { if (!bucket) return; const prefix = `${conversationId}/default/attachments/`; let cursor: string | undefined; do { const page = await bucket.list({ prefix, cursor }); if (page.objects.length) await bucket.delete(page.objects.map((o) => o.key)); cursor = page.truncated ? page.cursor : undefined; } while (cursor);}