0011-00000004

更新时间:
复制 MD 格式

Problem description

The key of a user metadata header contains invalid characters.

Causes

User metadata is a set of key-value pairs attached to an object. Keys must start with x-oss-meta- and can only contain the following characters:

  • Letters (a–z, A–Z)

  • Digits (0–9)

  • Hyphens (-)

Underscores (_) and other characters are not supported.

Note: Uppercase letters in keys are automatically converted to lowercase. For example, x-oss-meta-MyKey becomes x-oss-meta-mykey.

Examples

The following table shows valid and invalid user metadata key examples.

KeyValidReason
x-oss-meta-locationYes
x-oss-meta-last-modifiedYes
x-oss-meta-my_keyNoUnderscore not allowed
x-oss-meta-my keyNoSpace not allowed
locationNoMissing x-oss-meta- prefix

Solutions

Check the user metadata keys in your request and make sure each key meets the following requirements:

  • Starts with x-oss-meta-

  • Contains only letters, digits, and hyphens

You can specify multiple user metadata headers for a single object. The total size of all user metadata for an object cannot exceed 8 KB.

References