diff --git a/.gitignore b/.gitignore index bd973000..dbcb620b 100644 Binary files a/.gitignore and b/.gitignore differ diff --git a/pkg/channels/feishu/feishu_64.go b/pkg/channels/feishu/feishu_64.go index ef853079..6bffc9e2 100644 --- a/pkg/channels/feishu/feishu_64.go +++ b/pkg/channels/feishu/feishu_64.go @@ -1013,7 +1013,13 @@ func (c *FeishuChannel) storeResourceFile( }) return "" } - out.Close() + if closeErr := out.Close(); closeErr != nil { + logger.ErrorCF("feishu", "Failed to close downloaded resource file", map[string]any{ + "error": closeErr.Error(), + }) + os.Remove(localPath) + return "" + } ref, err := store.Store(localPath, media.MediaMeta{ Filename: filename,