@umbraco-cms/backoffice
    Preparing search index...

    Function toFriendlyName

    • Converts a file name to a friendly name suitable for use as a media item name.

      Strips the file extension, replaces underscores and dashes with spaces, title-cases each word (preserving all-uppercase words as acronyms), and collapses consecutive whitespace. Mirrors the server-side StringExtensions.ToFriendlyName helper — keep the two implementations in sync.

      Parameters

      • fileName: string

        The file name to convert.

      Returns string

      The friendly name.