* 清理指定页面的所有附件 * @param pageId 页面ID
(pageId: string)
| 144 | * @param pageId 页面ID |
| 145 | */ |
| 146 | async cleanupPageAttachments(pageId: string): Promise<{ success: boolean; error?: string }> { |
| 147 | try { |
| 148 | await cleanupPageAttachmentFiles(pageId) |
| 149 | return { success: true } |
| 150 | } catch (error) { |
| 151 | console.error('清理页面附件失败:', error) |
| 152 | return { |
| 153 | success: false, |
| 154 | error: error instanceof Error ? error.message : '清理页面附件失败' |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | /** |
| 160 | * 清理临时目录中的所有文件 |
no test coverage detected