Open MarchenkoRoman opened 5 months ago
I tried to copy file object in S3 using copy method, but found get_object and upload_fileobj in method used the same ExtraArgs, but according to boto3 documentation https://boto3.amazonaws.com/v1/documentation/api/latest/reference/customizations/s3.html#boto3.s3.transfer.S3Transfer its must be different
I think better use different ExtraArgs for get_object and upload_fileobj when its use in copy method for example:
async with s3_client as s3: await s3.copy( CopySource={'Bucket': settings.S3.BUCKET, 'Key': key}, Bucket=settings.S3.BUCKET, Key='new_tmp/' + key, ExtraArgs={'ACL': 'public-read'} )
will raise
ParamValidationError: Parameter validation failed: Unknown parameter in input: "ACL", must be one of: Bucket, IfMatch, IfModifiedSince, IfNoneMatch, IfUnmodifiedSince, Key, Range, ResponseCacheControl, ResponseContentDisposition, ResponseContentEncoding, ResponseContentLanguage, ResponseContentType, ResponseExpires, VersionId, SSECustomerAlgorithm, SSECustomerKey, SSECustomerKeyMD5, RequestPayer, PartNumber, ExpectedBucketOwner, ChecksumMode
Try v13.0.0 this should be resolved now.
v13.0.0
Description
I tried to copy file object in S3 using copy method, but found get_object and upload_fileobj in method used the same ExtraArgs, but according to boto3 documentation https://boto3.amazonaws.com/v1/documentation/api/latest/reference/customizations/s3.html#boto3.s3.transfer.S3Transfer its must be different
I think better use different ExtraArgs for get_object and upload_fileobj when its use in copy method for example:
will raise