brows3r — TypeScript API
    Preparing search index...

    Function objectSetMetadata

    • Replace the user-defined metadata on bucket/key.

      Uses a server-side CopyObject self-overwrite with MetadataDirective: Replace so the object body is preserved without re-uploading.

      When ifMatchEtag is supplied the backend enforces an ETag precondition. A mismatch rejects with AppError { kind: "Conflict" }.

      On success the backend emits objects:updated { profileId, bucket, prefix } for the parent prefix of key.

      Parameters

      • profileId: string

        The profile whose credentials to use.

      • bucket: string

        The bucket name.

      • key: string

        The full S3 key of the object.

      • metadata: MetadataMap

        New metadata map (replaces all existing metadata).

      • OptionalifMatchEtag: string

        Optional ETag precondition.

      Returns Promise<PutResult>