fix: update file upload to use RC 8.x rooms.media API#1070
fix: update file upload to use RC 8.x rooms.media API#1070Spiral-Memory merged 8 commits intoRocketChat:developfrom
Conversation
- 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
Khizarshah01
left a comment
There was a problem hiding this comment.
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.mp4hoping this work fine now |
Finally Checks are passing |
|
Hi @Spiral-Memory , Let me know if anything else needed here, whenever you get to review |
packages/api/src/EmbeddedChatApi.ts
Outdated
| return; | ||
| } | ||
|
|
||
| // Step 1: Upload file to rooms.media endpoint (RC 8.x) |
|
Hey @Spiral-Memory , It was one of my early PR in RC 🫠, didn't notice I left comments in code, I have removed them, let me know if anything else is needed once you review, thanks! |
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-1070 after approval. Contributors are requested to replace
<pr_number>with the actual PR number.