Skip to content

fix(attachments): rewrite attachment file ids when copying folders - #9387

Merged
mejo- merged 1 commit into
mainfrom
fix/copy_attachments_folder
Oct 15, 2026
Merged

mejo- merged 1 commit into
mainfrom
fix/copy_attachments_folder

Conversation

@mejo-

@mejo- mejo- commented Oct 15, 2026

Copy link
Copy Markdown
Member

When a folder with Markdown files is copied, the attachment folders are renamed and the relative .attachments.<id>/ links are updated, but /f/<fileId> links (e.g. embedded whiteboards) kept pointing at the attachments of the source file. Users without access to the source then saw broken attachments in the copy.

Map source attachments to their copies by file name and rewrite the file ids, as is already done when copying a single file.

Fixes a bug mentioned in nextcloud/collectives#2540.

Assisted-by: ClaudeCode:claude-opus-5-5

馃弫 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

When a folder with Markdown files is copied, the attachment folders are
renamed and the relative `.attachments.<id>/` links are updated, but
`/f/<fileId>` links (e.g. embedded whiteboards) kept pointing at the
attachments of the source file. Users without access to the source
then saw broken attachments in the copy.

Map source attachments to their copies by file name and rewrite the
file ids, as is already done when copying a single file.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo- mejo- self-assigned this Oct 15, 2026
@mejo- mejo- added bug Something isn't working 3. to review labels Oct 15, 2026
@github-project-automation github-project-automation Bot moved this to 馃Л Planning evaluation (don't pick) in 馃摑 Productivity team Oct 15, 2026
@mejo- mejo- moved this from 馃Л Planning evaluation (don't pick) to 馃憖 In review in 馃摑 Productivity team Oct 15, 2026
@mejo-

mejo- commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

/backport to stable35

@mejo-

mejo- commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

/backport to stable34

@mejo-

mejo- commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

/backport to stable33

@mejo-
mejo- merged commit ba1324f into main Oct 15, 2026
67 of 69 checks passed
@mejo-
mejo- deleted the fix/copy_attachments_folder branch October 15, 2026 07:20
@github-project-automation github-project-automation Bot moved this from 馃憖 In review to 鈽戯笍 Done in 馃摑 Productivity team Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants