diff --git a/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.context.ts b/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.context.ts index 75bbb7e31c..18e43e79df 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.context.ts @@ -18,8 +18,9 @@ export class UmbStaticFilePickerInputContext extends UmbPickerInputContext< super(host, UMB_STATIC_FILE_ITEM_REPOSITORY_ALIAS, UMB_STATIC_FILE_PICKER_MODAL); } - protected override getItemDisplayName(item: UmbStaticFileItemModel | undefined, unique: string): string { + protected override async _requestItemName(unique: string): Promise { // If item doesn't exist, use the file path as the name + const item = this.getSelectedItemByUnique(unique); return item?.name ?? this.#serializer.toServerPath(unique) ?? unique; } }