Skip to content

Conversation

@dodaa08
Copy link
Contributor

@dodaa08 dodaa08 commented Jan 15, 2026

  • Replace deprecated rooms.upload endpoint with new two-step process
  • Step 1: POST to rooms.media/:rid to upload file
  • Step 2: POST to rooms.mediaConfirm/:rid/:fileId to confirm with metadata
  • Fixes file upload 404 error on Rocket.Chat 8.x servers

Brief Title

fix: update file upload to use RC 8.x rooms.media API

Acceptance Criteria fulfillment

[x] File uploads work on Rocket.Chat 8.x servers
[x] Thread attachments supported (tmid parameter)
[x] File description is properly sent
[x] Auth headers included in both requests

Fixes #1069

Video/Screenshots

Screencast.From.2026-01-15.21-33-44.mp4

PR Test Details

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-<pr_number> after approval. Contributors are requested to replace <pr_number> with the actual PR number.

- Replace deprecated rooms.upload endpoint with new two-step process
- Step 1: POST to rooms.media/:rid to upload file
- Step 2: POST to rooms.mediaConfirm/:rid/:fileId to confirm with metadata
- Fixes file upload 404 error on Rocket.Chat 8.x servers
Copy link
Contributor

@Khizarshah01 Khizarshah01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally.

The upload flow works correctly and the change to rooms.media / rooms.mediaConfirm behaves as expected.

One minor UX issue I noticed (likely unrelated to this PR): after sending an image, selecting the same file again does not trigger the upload flow. This seems related to the file input value not being reset after upload.

LGTM 👍

@dodaa08
Copy link
Contributor Author

dodaa08 commented Jan 17, 2026

Tested locally.

The upload flow works correctly and the change to rooms.media / rooms.mediaConfirm behaves as expected.

One minor UX issue I noticed (likely unrelated to this PR): after sending an image, selecting the same file again does not trigger the upload flow. This seems related to the file input value not being reset after upload.

LGTM 👍

Screencast.From.2026-01-17.22-04-57.mp4

hoping this work fine now

@dodaa08
Copy link
Contributor Author

dodaa08 commented Jan 17, 2026

Tested locally.
The upload flow works correctly and the change to rooms.media / rooms.mediaConfirm behaves as expected.
One minor UX issue I noticed (likely unrelated to this PR): after sending an image, selecting the same file again does not trigger the upload flow. This seems related to the file input value not being reset after upload.
LGTM 👍

Screencast.From.2026-01-17.22-04-57.mp4
hoping this work fine now

Finally Checks are passing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: update file upload to use RC 8.x rooms.media API

2 participants