refactor(media): centralize temp media dir path

This commit is contained in:
Hoshina committed 2026-03-14 12:01:47 +08:00
1 parent 555af137b4
commit b9aaad95cd
5 files changed
+19 -6

No files matched your search

+1 -1
View File
@@ -618,7 +618,7 @@ func (c *FeishuChannel) downloadResource(
}
// Write to the shared picoclaw_media directory using a unique name to avoid collisions.
mediaDir := filepath.Join(os.TempDir(), "picoclaw_media")
mediaDir := media.TempDir()
if mkdirErr := os.MkdirAll(mediaDir, 0o700); mkdirErr != nil {
logger.ErrorCF("feishu", "Failed to create media directory", map[string]any{
"error": mkdirErr.Error(),