fix(alist_v3): missed Content-Length on upload (close #4457)

This commit is contained in:
Andy Hsu
2023-05-27 20:23:36 +08:00
parent 89f76d7899
commit 4369cbbac3
4 changed files with 5 additions and 16 deletions

View File

@ -175,6 +175,7 @@ func (d *AListV3) Put(ctx context.Context, dstDir model.Obj, stream model.FileSt
req.SetHeader("File-Path", path.Join(dstDir.GetPath(), stream.GetName())).
SetHeader("Password", d.MetaPassword).
SetHeader("Content-Length", strconv.FormatInt(stream.GetSize(), 10)).
SetContentLength(true).
SetBody(stream.GetReadCloser())
})
return err