mirror of
https://github.com/versity/versitygw.git
synced 2026-08-18 13:16:31 +00:00
fix: enforce 5gb copy source object size threshold.
Fixes #1896 Enforces the S3 `5 GiB` copy source size limit across the posix and azure backends for `CopyObject` and `UploadPartCopy`, returning `InvalidRequest` when the source object exceeds the threshold. The limit is now configurable via `--copy-object-threshold` (`VGW_COPY_OBJECT_THRESHOLD`, default 5 GiB). A new `--mp-max-parts flag` (`VGW_MP_MAX_PARTS`, default `10000`) has been added to make multipart upload parts number limit configurable. No integration test has been added, as GitHub Actions cannot reliably handle large objects.
This commit is contained in:
@@ -147,6 +147,18 @@ ROOT_SECRET_ACCESS_KEY=
|
||||
# strict validation checks.
|
||||
#VGW_DISABLE_STRICT_BUCKET_NAMES=false
|
||||
|
||||
# The VGW_MP_MAX_PARTS option sets the maximum number of parts allowed in a
|
||||
# single multipart upload. The S3 specification allows up to 10,000 parts per
|
||||
# multipart upload. The default value of 10000 matches the AWS S3 maximum.
|
||||
# Clients that attempt to upload more parts than this limit will receive an error.
|
||||
#VGW_MP_MAX_PARTS=10000
|
||||
|
||||
# The VGW_COPY_OBJECT_THRESHOLD option sets the maximum allowed source object
|
||||
# size in bytes for CopyObject and UploadPartCopy. Requests whose source
|
||||
# object exceeds this threshold will be rejected with an error. The default
|
||||
# value of 5368709120 (5 GiB) matches the AWS S3 'Copy' size limit.
|
||||
#VGW_COPY_OBJECT_THRESHOLD=5368709120
|
||||
|
||||
###############
|
||||
# Access Logs #
|
||||
###############
|
||||
|
||||
Reference in New Issue
Block a user