mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 21:05:10 +00:00
s3: Disable multipart uploads below 200MB
This commit is contained in:
parent
176b387d98
commit
7f3b2be1e8
@ -291,6 +291,8 @@ func (be *Backend) Save(ctx context.Context, h restic.Handle, rd restic.RewindRe
|
||||
opts.ContentType = "application/octet-stream"
|
||||
// the only option with the high-level api is to let the library handle the checksum computation
|
||||
opts.SendContentMd5 = true
|
||||
// only use multipart uploads for very large files
|
||||
opts.PartSize = 200 * 1024 * 1024
|
||||
|
||||
debug.Log("PutObject(%v, %v, %v)", be.cfg.Bucket, objName, rd.Length())
|
||||
info, err := be.client.PutObject(ctx, be.cfg.Bucket, objName, ioutil.NopCloser(rd), int64(rd.Length()), opts)
|
||||
|
Loading…
Reference in New Issue
Block a user