fup: set buffer size to 8MiB

SeaweedFS' default chunk size is 4MiB; if we don't match it (or a multiple)
then our multipart uploads become uneven because they end up as chunks of the
buffer size followed by the remaining data. This is particularly egregious with
the current default of 5MiB, because then we get a 4MiB chunk followed by a
1MiB chunk every time.
This commit is contained in:
Luke Granger-Brown 2024-10-20 17:23:36 +01:00
parent 2e9b5e4a66
commit 8b27353be7

View file

@ -40,6 +40,7 @@ func (m *Metadata) WriterOptions() *blob.WriterOptions {
}
return &blob.WriterOptions{
BufferSize: 8 * 1024 * 1024, /* 8 MiB */
CacheControl: attrs.CacheControl,
ContentDisposition: attrs.ContentDisposition,
ContentEncoding: attrs.ContentEncoding,