From aa7bfbd393ba7e0790f46b4d464faf2d0be604df Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 10 Jun 2022 22:01:22 +0200 Subject: [PATCH] fix invalid min part size (5MiB instead of 5MB) --- docker-compose.yml | 2 +- pkg/config/config.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index dfb068c..d43c4cb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,7 +38,7 @@ services: GOSE_ACCESS_KEY: "admin-user" # changeme! GOSE_SECRET_KEY: "admin-pass" # changeme! GOSE_MAX_UPLOAD_SIZE: "50GB" - GOSE_PART_SIZE: "5MB" + GOSE_PART_SIZE: "16MB" depends_on: - minio diff --git a/pkg/config/config.go b/pkg/config/config.go index 71c7e79..1c49ddf 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -15,13 +15,13 @@ import ( const ( // MinPartSize is the minimally supported part size for an S3 multi-part upload part. - MinPartSize size = 5e6 // 5MB + MinPartSize size = 5 << 20 // 5MiB // DefaultPartSize is the default size of the chunks used for Multi-part Upload if not provided by the configuration - DefaultPartSize size = 16e6 // 16MB + DefaultPartSize size = 16 << 20 // 16MiB // DefaultMaxUploadSize is the maximum upload size if not provided by the configuration - DefaultMaxUploadSize size = 1e12 // 1TB + DefaultMaxUploadSize size = 1 << 40 // 1TiB // DefaultRegion is the default S3 region if not provided by the configuration DefaultRegion = "us-east-1"