fix(doubao_new): remove temp file after cross-storage put (#2530)

This commit is contained in:
Suyunjing
2026-05-27 16:49:26 +08:00
committed by GitHub
parent 4c77b9c7bf
commit 98c32d3be4
+5 -1
View File
@@ -12,6 +12,7 @@ import (
"io"
"net/http"
"net/url"
"os"
"sort"
"strings"
"sync"
@@ -300,7 +301,10 @@ func (d *DoubaoNew) Put(ctx context.Context, dstDir model.Obj, file model.FileSt
if err != nil {
return nil, err
}
defer tmpFile.Close()
defer func() {
_ = tmpFile.Close()
_ = os.Remove(tmpFile.Name())
}()
blockSize := uploadPrep.BlockSize
totalSize := file.GetSize()