diff --git a/changelog/unreleased/bugfix-upload-overlay-public-parent-folder b/changelog/unreleased/bugfix-upload-overlay-public-parent-folder new file mode 100644 index 00000000000..5210904db71 --- /dev/null +++ b/changelog/unreleased/bugfix-upload-overlay-public-parent-folder @@ -0,0 +1,6 @@ +Bugfix: Parent folder name on public links + +We've fixed a bug where the parent folder link in the upload overlay on public pages would show the link's token instead of "Public link". + +https://github.com/owncloud/web/pull/7104 +https://github.com/owncloud/web/issues/7101 diff --git a/packages/web-runtime/src/components/UploadInfo.vue b/packages/web-runtime/src/components/UploadInfo.vue index 6ba4d95e3fe..091a3107c29 100644 --- a/packages/web-runtime/src/components/UploadInfo.vue +++ b/packages/web-runtime/src/components/UploadInfo.vue @@ -335,7 +335,14 @@ export default { } this.uploads[file.meta.uploadId] = file - this.uploads[file.meta.uploadId].path = `${file.meta.currentFolder}${file.name}` + + if (file.meta.route?.name === 'files-public-files') { + // Strip token to not display it in the overlay + const strippedTokenPath = file.meta.currentFolder.split('/').slice(1).join('/') + this.uploads[file.meta.uploadId].path = `${strippedTokenPath}${file.name}` + } else { + this.uploads[file.meta.uploadId].path = `${file.meta.currentFolder}${file.name}` + } this.uploads[file.meta.uploadId].targetRoute = file.meta.route if (!file.isFolder) { @@ -426,6 +433,10 @@ export default { if (this.hasShareJail && targetRoute?.name === 'files-spaces-share') { return targetRoute.params.shareName } + + if (targetRoute?.name === 'files-public-files') { + return this.$gettext('Public link') + } return this.hasShareJail ? this.$gettext('Personal') : this.$gettext('All files and folders') }, createFolderLink(path, storageId, targetRoute) { @@ -449,6 +460,10 @@ export default { route.params.item = strippedPath } + if (route.name === 'files-public-files') { + route.params.item = targetRoute.params.item + } + return route }, toggleInfo() {