mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-10-10 04:53:09 +08:00
fix(doubao_new): remove temp file after cross-storage put (#2530)
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -300,7 +301,10 @@ func (d *DoubaoNew) Put(ctx context.Context, dstDir model.Obj, file model.FileSt
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer tmpFile.Close()
|
defer func() {
|
||||||
|
_ = tmpFile.Close()
|
||||||
|
_ = os.Remove(tmpFile.Name())
|
||||||
|
}()
|
||||||
|
|
||||||
blockSize := uploadPrep.BlockSize
|
blockSize := uploadPrep.BlockSize
|
||||||
totalSize := file.GetSize()
|
totalSize := file.GetSize()
|
||||||
|
|||||||
Reference in New Issue
Block a user