aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-06-03 14:20:13 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2025-06-05 11:13:24 +0200
commit3dea8f7fec2f6202f63304101d9494b478e7b5d8 (patch)
tree17b6bbc656fc699905222baae71ec6edc310a7da
parent609c25acfc0466d91cdd70b9dc8e705119043724 (diff)
downloadnextcloud-server-3dea8f7fec2f6202f63304101d9494b478e7b5d8.tar.gz
nextcloud-server-3dea8f7fec2f6202f63304101d9494b478e7b5d8.zip
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 <opensource@fthiessen.de>
-rw-r--r--core/src/OC/dialogs.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/OC/dialogs.js b/core/src/OC/dialogs.js
index c10f676701d..5c5e8cf5887 100644
--- a/core/src/OC/dialogs.js
+++ b/core/src/OC/dialogs.js
@@ -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',
})
}