mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-22 12:58:45 +08:00
fix(s3): increase PartSize
if filesize > 50000MB (close #4017)
This commit is contained in:
parent
4ec274e748
commit
d3efee2ea1
@ -128,6 +128,9 @@ func (d *S3) Remove(ctx context.Context, obj model.Obj) error {
|
||||
|
||||
func (d *S3) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error {
|
||||
uploader := s3manager.NewUploader(d.Session)
|
||||
if stream.GetSize() > s3manager.MaxUploadParts*s3manager.DefaultUploadPartSize {
|
||||
uploader.PartSize = stream.GetSize() / (s3manager.MaxUploadParts - 1)
|
||||
}
|
||||
key := getKey(stdpath.Join(dstDir.GetPath(), stream.GetName()), false)
|
||||
log.Debugln("key:", key)
|
||||
input := &s3manager.UploadInput{
|
||||
|
Loading…
x
Reference in New Issue
Block a user