Skip to content

Commit

Permalink
Use BufferProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
hirose31 committed Apr 28, 2022
1 parent 5786706 commit cce5805
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/m/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ func (s3m *S3Model) SetBucket(bucket string) error {
}

s3m.client = s3.NewFromConfig(cfg)
s3m.downloader = s3manager.NewDownloader(s3m.client)
s3m.downloader = s3manager.NewDownloader(s3m.client, func(d *s3manager.Downloader) {
d.BufferProvider = s3manager.NewPooledBufferedWriterReadFromProvider(8 * 1024 * 1024) // 8MB
})

return nil
}
Expand Down

0 comments on commit cce5805

Please sign in to comment.