fix: close form file (#2416)

Signed-off-by: guangwu <guoguangwug@gmail.com>
This commit is contained in:
guangwu 2024-04-20 04:38:14 +08:00 committed by GitHub
parent c2238c71b8
commit b904793278
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -364,6 +364,7 @@ func (u *Uploader) AddFile(key, filename string) error {
if err != nil {
return err
}
defer source.Close()
return u.AddFileSource(key, filename, source)
}