Skip to content

fix: no image from the cloud in the text editor on public links - #3632

Merged
AlexAndBear merged 1 commit into
mainfrom
fix/editor-cloud-image-public-link
Oct 12, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
fix/editor-cloud-image-public-link

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

On public links, the text editor offered "Insert image" → "Insert from cloud", but the file picker can't offer anything useful there: it opens the parent folder of the edited file and an anonymous user can't browse anywhere else – for links to a single file, the picker only shows the edited file itself.

"Insert from cloud" is now hidden on public links (publicLinkContextReady of the auth store, like isPublicLinkContext of useAppDefaults), in the image dropdown and in the slash commands. "Image from file" and "Image from URL" stay available.

Related Issue

How Has This Been Tested?

  • test environment: unit tests (Vitest), pnpm check:types
  • test case 1: on a public link, the image dropdown offers file and URL only, the cloud action isn't a slash command
  • test case 2: outside public links, the cloud action is offered as before (existing tests)

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

On public links the file picker only shows the shared files, for links to a single file just the edited file itself, so there is nothing to pick.
@AlexAndBear

Copy link
Copy Markdown
Member Author

On folder links, picking an image from the shared folder could actually be useful, so ideally the action would only be hidden for links to a single file. That isn't possible yet: the root of every public link reports public-link-item-type = folder, also for single-file links (see opencloud-eu/opencloud#3693). Until the backend tells them apart, this PR hides the action on all public links; once it does, the check can become isPublicSpaceResource(space) && space.publicLinkItemType === 'file'.

@AlexAndBear
AlexAndBear merged commit bd2a65b into main Oct 12, 2026
32 checks passed
@AlexAndBear
AlexAndBear deleted the fix/editor-cloud-image-public-link branch October 12, 2026 08:43
@openclouders openclouders mentioned this pull request Oct 12, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Insert from cloud" in the text editor is a dead end on public links

2 participants