brows3r — TypeScript API
    Preparing search index...

    Function objectPutText

    • Write a UTF-8 text body to bucket/key.

      When ifMatchEtag is supplied the backend sets the S3 If-Match header so the write is rejected with AppError { kind: "Conflict" } if the object was modified since the editor loaded it (HTTP 412).

      Omit ifMatchEtag (or pass undefined) for an unconditional "save anyway" after a conflict.

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

      OCP: additional options (content-type, metadata) can be added as optional fields without breaking existing call sites.

      Parameters

      • profileId: string

        The profile whose credentials to use.

      • bucket: string

        The bucket name.

      • key: string

        The full S3 key of the object.

      • body: string

        UTF-8 text content to write.

      • OptionalifMatchEtag: string

        Optional ETag precondition from objectGetText.

      Returns Promise<PutResult>