Skip to content

refactor(Wopi): drop unused PUT_RELATIVE branch from putFile()#5620

Open
joshtrichards wants to merge 1 commit intomainfrom
jtr/refacor-wopiController-unused-PutRelativeFile-branch
Open

refactor(Wopi): drop unused PUT_RELATIVE branch from putFile()#5620
joshtrichards wants to merge 1 commit intomainfrom
jtr/refacor-wopiController-unused-PutRelativeFile-branch

Conversation

@joshtrichards
Copy link
Copy Markdown
Member

@joshtrichards joshtrichards commented May 1, 2026

Summary

The code for PUT_RELATIVE in putFile() (which implements the POST /wopi/files/{fileId}/contents endpoint) is dead code. This file operation is never accessed via the contents endpoint. It is already handled via postFile()'s default/else branch on the POST /wopi/files/{fileId} endpoint.

Besides being dead code, having this non-spec alternative path around is confusing and dangerous since there is support for that override on the appropriate endpoint and the logic is a big different.

Already confirmed that Collabora Online uses the correct WOPI-compliant endpoint per it's code.

Change extracted from other refactoring work.

TODO

  • ...

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

PUT_RELATIVE is never accessed via this endpoint. It is already handled via postFile()'s else branch.

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added bug Something isn't working 3. to review Ready to be reviewed technical debt labels May 1, 2026
@joshtrichards joshtrichards marked this pull request as ready for review May 1, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Ready to be reviewed bug Something isn't working technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect (extra) route for "save as" (WOPI PutRelativeFile / PUT_RELATIVE) file operation?

1 participant