Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(core): correctly show displayname when picking a file
Ensure that the display name is shown instead of the filename (important for public shares).
Fixed in the library but the legacy wrapper still uses it.

Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux authored and leftybournes committed Jun 18, 2025
commit 15a16b61fd2a45134b46c66dba66ae3c89f8799b
6 changes: 3 additions & 3 deletions core/src/OC/dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ const Dialogs = {
} else {
builder.setButtonFactory((nodes, path) => {
const buttons = []
const node = nodes?.[0]?.attributes?.displayName || nodes?.[0]?.basename
const target = node || basename(path)
const [node] = nodes
const target = node?.displayname || node?.basename || basename(path)

if (type === FilePickerType.Choose) {
buttons.push({
callback: legacyCallback(callback, FilePickerType.Choose),
label: node && !this.multiSelect ? t('core', 'Choose {file}', { file: node }) : t('core', 'Choose'),
label: node && !this.multiSelect ? t('core', 'Choose {file}', { file: target }) : t('core', 'Choose'),
type: 'primary',
})
}
Expand Down