diff --git a/.gitignore b/.gitignore index bd9730001..dbcb620b4 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 ef853079f..6bffc9e29 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,