@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Function encodeFileName

    • Percent-encodes a file name using the B2-specific encoding rules.

      Unlike standard encodeURIComponent, B2 keeps / and several other characters unencoded while encoding all other non-ASCII and special characters as uppercase percent-encoded UTF-8 bytes.

      Parameters

      • name: string

        The raw (unencoded) file name.

      Returns string

      The percent-encoded file name suitable for X-Bz-File-Name headers.