Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

multipart: make pool buffer size public

Nick Craig-Woode686e34f89ef
diff --git a/lib/multipart/multipart.go b/lib/multipart/multipart.go
index f96db4533..c388acc01 100644
--- a/lib/multipart/multipart.go
+++ b/lib/multipart/multipart.go
@@ -17,7 +17,7 @@ import (
)
const (
- bufferSize = 1024 * 1024 // default size of the pages used in the reader
+ BufferSize = 1024 * 1024 // BufferSize is the default size of the pages used in the reader
bufferCacheSize = 64 // max number of buffers to keep in cache
bufferCacheFlushTime = 5 * time.Second // flush the cached buffers after this long
)
@@ -33,7 +33,7 @@ func getPool() *pool.Pool {
bufferPoolOnce.Do(func() {
ci := fs.GetConfig(context.Background())
// Initialise the buffer pool when used
- bufferPool = pool.New(bufferCacheFlushTime, bufferSize, bufferCacheSize, ci.UseMmap)
+ bufferPool = pool.New(bufferCacheFlushTime, BufferSize, bufferCacheSize, ci.UseMmap)
})
return bufferPool
}