Closed erny closed 1 year ago
Client version: 7.1.13 Server version: 2023-03-24T21:41:23Z
When putting objects, metadata is normalized with "X-Amz" prefix:
put_object -> genheaders -> normalize_headers -> _metadata_to_headers: https://github.com/minio/minio-py/blob/6562b765954af6beff2bc2c691b7d87060f0e011/minio/helpers.py#L297-L302
put_object
genheaders
normalize_headers
_metadata_to_headers
But when retrieving an object using stat_object (-> _execute), an Object is returned: https://github.com/minio/minio-py/blob/6562b765954af6beff2bc2c691b7d87060f0e011/minio/api.py#L1908-L1917 and any hearders are attached directly to ._metadata (without transforms) https://github.com/minio/minio-py/blob/6562b765954af6beff2bc2c691b7d87060f0e011/minio/datatypes.py#L119
stat_object
_execute
._metadata
But it is not transformed when getting the metadata https://github.com/minio/minio-py/blob/6562b765954af6beff2bc2c691b7d87060f0e011/minio/datatypes.py#L158-L161
This is expected behavior to avoid conflicting return values. The user should aware that x-amz-meta should be prefixed for all user metadata.
Client version: 7.1.13 Server version: 2023-03-24T21:41:23Z
When putting objects, metadata is normalized with "X-Amz" prefix:
put_object
->genheaders
->normalize_headers
->_metadata_to_headers
: https://github.com/minio/minio-py/blob/6562b765954af6beff2bc2c691b7d87060f0e011/minio/helpers.py#L297-L302But when retrieving an object using
stat_object
(->_execute
), an Object is returned: https://github.com/minio/minio-py/blob/6562b765954af6beff2bc2c691b7d87060f0e011/minio/api.py#L1908-L1917 and any hearders are attached directly to._metadata
(without transforms) https://github.com/minio/minio-py/blob/6562b765954af6beff2bc2c691b7d87060f0e011/minio/datatypes.py#L119But it is not transformed when getting the metadata https://github.com/minio/minio-py/blob/6562b765954af6beff2bc2c691b7d87060f0e011/minio/datatypes.py#L158-L161