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

    Function ensureMediaNameFromFile

    • Populates the media workspace name from an uploaded file when the user has not already provided one. The filename is converted to a friendly name (extension stripped, dashes/underscores replaced, title-cased) before being applied.

      Does nothing if the consumed dataset context is not a media item, or if a non-empty name is already set.

      Parameters

      • host: UmbClassInterface

        The context-consuming host (typically the calling element).

      • file: File

        The uploaded file whose name should seed the media item name.

      Returns Promise<void>