Skip to content

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

@dodaa08

Description

@dodaa08

Description:

File uploads fail with a 404 Not Found error when using EmbeddedChat with Rocket.Chat 8.x servers. The sendAttachment function uses the deprecated /api/v1/rooms.upload/:rid endpoint which was replaced in RC 8.x with a new two-step process using /api/v1/rooms.media/:rid and /api/v1/rooms.mediaConfirm/:rid/:fileId.

Steps to reproduce:

  1. Connect EmbeddedChat to a Rocket.Chat 8.x server
  2. Log in to the chat
  3. Try to upload a file (image, document, etc.) using the attachment button
  4. Observe the network request failing with 404

Expected behavior:

File should upload successfully and appear in the chat.

Actual behavior:

Upload fails with:
POST http://localhost:3000/api/v1/rooms.upload/{roomId} 404 (Not Found)sendAttachment error: Server error 404 404 Not Found

The file is never uploaded because Rocket.Chat 8.x uses the new rooms.media + rooms.mediaConfirm two-step process

Screencast.From.2026-01-15.21-47-17.mp4

Hoping this issue happens globally due to, hitting the old file upload endpoint

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions