diff --git a/api/layer/layer.go b/api/layer/layer.go index 0df76d3d..adedb54b 100644 --- a/api/layer/layer.go +++ b/api/layer/layer.go @@ -254,7 +254,7 @@ const ( AttributeHMACSalt = api.NeoFSSystemMetadataPrefix + "HMAC-Salt" AttributeHMACKey = api.NeoFSSystemMetadataPrefix + "HMAC-Key" - AttributeNeofsCopiesNumber = "neofs-copies-number" // such formate to match X-Amz-Meta-Neofs-Copies-Number header + AttributeNeofsCopiesNumber = "neofs-copies-number" // such format to match X-Amz-Meta-Neofs-Copies-Number header ) var ( diff --git a/docs/aws_s3_compat.md b/docs/aws_s3_compat.md index 6fd89168..66866c6b 100644 --- a/docs/aws_s3_compat.md +++ b/docs/aws_s3_compat.md @@ -31,12 +31,17 @@ Reference: * DeleteObjects limited by max amount of objects which can be deleted per request. See `max_object_to_delete_per_request` parameter. * For calculating object ETag, we use SHA256 hash instead of MD5. * PutObject into a container with public-write permissions as an anonymous user (for instance, with CLI option --no-sign-request) is impossible, if try to set custom ACL for the object. It happens because container ACL rules may be changed only by container owner. - +* Header `X-Amz-Meta-Neofs-Copies-Number` can be used with `PutObject`, `CopyObject`, `CreateMultipartUpload` methods to set object copies number. Otherwise, the default value from config will be used. See [neofs section](https://github.com/nspcc-dev/neofs-s3-gw/blob/master/docs/configuration.md#neofs-section) for more details. + * Use metadata `neofs-copies-number` parameter for aws CLI. For instance: + ```shell + aws s3api put-object --endpoint $S3HOST --bucket $BUCKET --key $OBJECT_KEY --body /path/to/file.txt --metadata neofs-copies-number=3 + ``` + ## ACL For now there are some limitations: * [Bucket policy](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-policies.html) supports only one `Principal` per `Statement`. -Principal must be `"AWS": "*"` or `"*"` (to refer all users) or `"CanonicalUser": "0313b1ac3a8076e155a7e797b24f0b650cccad5941ea59d7cfd51a024a8b2a06bf"` (hex encoded public key of desired user). +Principal must be `"AWS": "*"` or `"*"` (to refer all users) or `"CanonicalUser": "NiskPF9pfRMzg7V7PeB4d6ogLzu74a1L2Q"` (base58 encoded address of desired user). ```json { "Statement": [