fix: alist upload

This commit is contained in:
Simon Ding
2024-11-17 23:40:31 +08:00
parent af2a30405c
commit 3af4ac795e
3 changed files with 30 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ func (a *Alist) Copy(src, dest string) error {
a.progresser = b.Progress
uploadFunc := func(destPath string, destInfo fs.FileInfo, srcReader io.Reader, mimeType *mimetype.MIME) error {
_, err := a.client.UploadStream(srcReader, destPath)
_, err := a.client.UploadStream(srcReader, destInfo.Size(), destPath)
return err
}
mkdirFunc := func(dir string) error {