RocketChat / RocketChat/Rocket.Chat

Can not upload attachement to webdav (nextcloud)

Open
#35,792 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

I set up my nextcloud server into RC. I can send files from NC to RC but I can not save attachment to my NC.
"Error while loading file"

Steps to reproduce:
  1. Add a nextcloud server to my account: plus sign near message box, add server
  2. On a messge with attachment, click on three dots, save to webdav
  3. Error...
Expected behavior:

The file must be uploaded to nextcloud

Actual behavior:

"Error while loading file"

Server Setup Information:
  • Version of Rocket.Chat Server: 7.5.1
  • License Type: community
  • Number of Users:
  • Operating System:
  • Deployment Method:
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version:
Client Setup Information
  • Desktop App or Browser Version: 4.1.4 (tested on desktop app and browser)
  • Operating System:
Additional context
Relevant logs:
{"level":50,"time":"2025-04-13T13:58:23.227Z","pid":1,"hostname":"tchat-rocketchat-85bfbb6747-tfnxp","name":"WebDAV_Upload","err":{"type":"TypeError","message":"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Object","stack":"TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Object\n    at Function.from (node:buffer:325:9)\n    at uploadFileToWebdav (app/webdav/server/lib/uploadFileToWebdav.ts:14:24)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at MethodInvocation.uploadFileToWebdav (app/webdav/server/methods/uploadFileToWebdav.ts:39:4)\n    at app/lib/server/lib/debug.js:85:20","code":"ERR_INVALID_ARG_TYPE"},"msg":"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Object"}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in app/webdav/server/lib/uploadFileToWebdav.ts and trace its call from app/webdav/server/methods/uploadFileToWebdav.ts. Use the reported WebDAV upload flow and error as the starting case, then verify that saving a message attachment to Nextcloud completes without the loading error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.